Spring 2.0 Debuts in Cork

One year ago, when [tag]Rod Johnson[/tag] addressed Irish Java developers in [tag]Cork[/tag], he gave us a scoop. [tag]Interface21[/tag] (the company behind the [tag]Springframework[/tag]) had just acquired [tag]Adrian Colyer[/tag] (the brains behind AspectJ, the main implementation of [tag]AOP[/tag] in Java). It was an intriguing piece of news that seemed to open up a lot of new avenues for the way in which Spring could be used, though of course it was hard to visualize exactly what the outcome of this collaboration would be. Yesterday afternoon, twelve months on, Adrian himself came to Cork to show us exactly what they’ve been doing, and to hand us another scoop.

The timing was perfect. Adrian talked for an hour during which time the countdown to the official [tag]Spring 2.0[/tag] launch hit zero. Adrian reckoned, based on what he knew his Interface21 colleagues to be doing at that moment, that he was the first to be able to make the announcement in person to the Java development community. Spring 2.0 has a lot of new and exciting features, some of which we’ve already discussed on this blog, but in large part it represents the fruit of Adrian’s collaboration. His presentation storyboarded the way in which he expects AOP to be used in a Spring context. By the end of the talk, it was clear what had just happened: Spring had acquired an entire extra dimension.

When describing [tag]Spring[/tag] in the past, I have always said that it was made of two parts: The underlying Dependency Injection substrate, and the gamut of service abstractions that can be embedded into this substrate. Now there is a third dimension which unlocks the simplifying power of Spring: AOP. Spring is able to interpret the [tag]AspectJ[/tag] Pointcut syntax and apply most kinds of advice using its own Proxy-based mechanisms (i.e. without weaving with AspectJ’s compiler). This is emphatically not simply another service abstraction bolted on to the DI container. It is a new mechanism within Spring which uses the power of pointcuts to:

  1. Greatly simplify the Spring configuration required to perform interception
  2. Move the level of abstraction behind this interception up a notch to the architectural point of view

As Adrian put it, it allows us to use the abstract vocabulary of architecture in the implementation. We can identify the architectural layers of our code with pointcuts, and apply high-level rules to these layers using advice. I particularly like this approach as it blurs the lines further between architect and developer: The architects can (must!) express themselves in the implementation, and the developers can see, understand and manipulate these architectural ideas directly in the code.

A very attractive feature of Spring 2.0’s approach to AOP is it’s use of [tag]Java Annotations[/tag]. Adrian coined the term “annophobe” to describe those with an irrational fear of annotations. I’m more of an “annognostic” – I just don’t know much about this side of Java 5 yet. But having seen them in action yesterday, I’ll be hitting the books immediately. By annotating normal java classes and methods as aspects, pointcuts, advice etc, the developer is free to let those annotations be interpreted by Spring or by AspectJ – or both. This is too efficient to ignore, so anyone who intends to use Spring AOP will need to deal with any annophobia issues – and make a case for developing and deploying on the Java 5 platform.

Adrian’s talk was part of [tag]it@cork[/tag]’s Java conference, and he shared the platfrom with Sun’s [tag]Simon Ritter[/tag]. The volume of interesting, useful and well-presented information from both speakers was such that it will take more than one blog entry to cover it, but I would like to thank both Simon and Adrian for bringing their world-class perspectives on their fields to Cork’s development community. The event itself was exceptionally well organized – I have rarely seen such a punctual and smoothly run operation – so a big thank you to Catherine Wall and Deirdre Lacey of it@cork.

Watch this space for more blogs on this event.

– brendan lawlor –

  1. #1 by kenneth on October 4, 2006 - 10:54 am

    Found the Spring discussion very interesting. Simon also did a good job highlighting the new features in Java 6. Is Java starting to trail c# though in terms of new language features. Am I correct in saying c# incorporated generics and annotations before Java 5 came out? Desktop support, splash screens etc aren’t particaularly ground breaking are they? …. A discussion for another day :0)

    Very well run conference, Excellent content and well done to it@cork.

  2. #2 by Brendan Lawlor on October 9, 2006 - 2:46 pm

    Hi Kenneth,
    Dunno who was trailing whom on the generics front. But it has been a number of years now since both camps have started to watch and copy the best stuff from each other. This is working out really well for developers in general. We’ve had a number of engineers make the move from Java to C# without any great discomfort, and look forward to doing the same in reverse when required.

    – brendan –

  3. #3 by Yahoouj on February 14, 2010 - 1:29 am

    Really good work about this website was done. Keep trying more – thanks!

  1. What sets DSI apart. A political slant. at DeCare Systems Ireland Blog

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: