All 4 entries tagged Springone

View all 16 entries tagged Springone on Warwick Blogs | View entries tagged Springone at Technorati | There are no images tagged Springone on this blog

June 15, 2006

Session 4: Enterprise Development with JPA

[Patrick Linskey / Mike Keith]

blah blah; JPA is a lot like hibernate. Two of the worst posible examples for mapping inheritance person<={employee, customer} , animal<={land animal, air animal} (can't employees buy stuff? What about penguins and sugar–gliders) :–)

There are a couple of slightly ugly–looking features in JPA that the 'enterprise–ness' foists on you, like forcing optimistic locking version numbers into the bean – great if you do intend to use detach/re–attach semantics, a pain if not.

Some EJB persistence providers will auto–detect annotated classes from a JAR, so you don't need to declare anything about which classes are persistent outside of the classes themselves. This could be really cool, if it's sufficiently fast

Session3: AOP and Domain Driven Design

Contention: You can't do full DDD without AOP

DDD is about moving away from database–driven design and towards an object model with is a meta–language for the problem domain

Itegration services (email facade, report generator) == good ; technical services (AccountingService – providing TX + Audit to Accounts) == bad
AJ gives us a (nother) way of injecting services onto POJOs when they come out of persistent storage; has the advantage that it can also DI on construction and/or deserialization

neat semantic trick; given Order and OrderLine classes, have a method Order.with(product, quantity) to

add a new OrderLine and return a reference to self, so you can say


Example of Domain AOP: associating failure behaviour (retry or check credit history) with domain objects – have a set of aspects which encapsulate the behaviour, applied to the order object (which need not contain this logic). I guess this would be OK if your whole team and your development process was AOP–friendly.

refactoring towards DDD: move logic from service layers into domain objects; move crosscutting concerns into aspects. Finally remove the service layer itself. If there's still logic in the service layer, look for missing domain objects

session 2: spring AOP

[Adrian Colyer]

– spring AOP can be applied either using xml config (optionally with the [aop:] namespace) or using @AspectJ apsects
– spring and AJ are still separate projects, but spring now uses the AJ pointcut paser/matching API not using the weaving engine / compiler
really simple to advise beans being instantiated via the container.
– Lots of really good examples. I hope we get access sample code
– AJ can do pretty smart code inspection to generate warnings and errors about code usage.
– jMon profiling library – easy to integrate with apsects around methods to be profiled.
– migration to AOP: start with spring OOTB AOP (e.g. transactions), then add custom spring AOP, then use AJ for enforcement/inspection, then intfrastructure with AJ, finally domain aspects with AJ

springone keynote

It's the conference season again. I'm in Antwerp for SpringOne, a developer get–together for users of the spring framework. I'll be blogging key points from all of the sessions I attend, battery permitting. So to begin; Rod Johnson's keynote.

– Rod's intro section is largely bog–standard 'rah rah rah for spring'. However, he then bought on the IT director of VOCA (BACS as was) talking about their experience of using Spring for totally mission–critical software (i.e. the UK banks clearing house). Writing code for handling 100,000,000 complex transactions in a 4 hour window with no failures. It's impressive to hear about how the technology's being adopted in such a conservative and risk–averse environment.

Rod then goes on to talk about how BEA are building on spring 2 to provide their JEE5 implementation. (pitchfork), then the 'what's new in spring 2.0' highlights – simplified config, AOP, web flow, simplified transactions, IL8N, and JPA.

Support for dynamic JVM languages (groovy, jruby, etc) looks pretty cool – define a bean in jRuby, and spring will let you use it just like a regular java class, except that it will also allow you to periodically poll the script for changes and bring them in at runtime – auto–redeploys ahoy :–)

Then onto Adrian Colyer, who talked a little bit about AspectJ AOP (good) vs JEE5 AOP (bad), then goes onto spring post–2.0. Spring 2.0 is the launchpad; the set of foundation abstractions, but there's a lot more to do. Moving towards a more rails–ish environment with an emphasis on convention over configuration, rolling out support for profiling and instrumentation and looking at reducing time–to–refresh in development. Also operational enhancements to make it easier and more productive at runtime – including OSGi support for module replacement, and SCA support.

On a side note, the keynote is held in a cinema, with comfy seats and THX sound, which would be totally cool were it not for the fact that the aircon is shot and the temperature is about 70 degrees C.

Most recent entries


Search this blog

on twitter...


    RSS2.0 Atom
    Not signed in
    Sign in

    Powered by BlogBuilder
    © MMXXI