This time a quite technical presentation.
First half is an introduction to AOP and AspectJ syntax (code, annotations, xml) with pros and cons for the different syntaxes.
Interesting thing in Spring 2.1 is the new Native AspectJ weaving.
Also of interest is now the bean(*) syntax. This allows to create pointcuts based on beans characteristics (name for example).
He then demonstrates how you can use AspectJ to enforce Architecture designs.
For example showing errors at compile time when somebody access data from the ui layer. You can basically enforce things by modifying compiling behaviour. Interesting, but this can become really messy if done too loosely.
Adding mixin to interfaces is also interesting when you have to deal with boilerplate code for implemented interfaces (for Example the *Aware interfaces whose method implementations is 99,99% of the times the same).
Interesting usage is also the ability to implement retry/failover strategies for remote services using around advices.
Sadly AOSGI is only mentionned but not discussed in details. That was the reason of my presence in the first place in this presentation... :P
Overrall it's interesting to see how AOP is now so widely used ;) (when using Spring at least).

0 commentaires:
Enregistrer un commentaire