AOP diagram

Aspect-Oriented Programming – Part 2

AOP Example

Last week I covered the concepts and terminology of aspect-oriented programming. As promised, this week I’ll illustrate the main AOP concepts with some code examples.

How we actually implement AOP programmatically will depend on the framework/container we’re using. There are many implementations, including AspectJ, JBoss AOP and Spring AOP.

For the sake of simplicity, I’ll use AspectJ annotated classes as used by the Spring AOP as the examples. If you use a different implementation, your code may be a little different.

Continue reading