TSSS: Notes from Enterprise AOP Session
10:00 - 11:15
Ron Bodkin and Dion Almaer quickly went through AOP Basics, including advices, pointcuts, and join points. The definition of pointcuts and join points is somewhat similar. In my opinion, we could compare pointcut with class definition and join point with class instance in OOP.
The AspectJ support in eclipse looks great and has many features, including navigation and debugging. I should definitely give it a try.
AspectJ supports warning and error declarations. This feature can be used to analyze the code. For example, you can have an aspect which produces a warning message if certain rules are broken.
Aspect libraries can be created to have a common set of aspects. The library aspects can be extended to provide a behaviour specific to the application. It is important to ensure that aspects are stable, brittle aspects have too much knowledge about the application and will break easily.
It is interesting that around advice is rarely used in AspectJ: in general it is not a good practice to wrap the original method and not call it (except maybe caching or security).
Comments