Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the simplest and least dependent AOP framework in Java?

I want to use an AOP framework, but I have two constraints.

Any framework that I choose

  1. Must be fairly independent. I plan to use this in a legacy code base, and hence cannot upgrade prospective dependencies like commons-logging-XXX.jar to commons-logging-newest.jar.

  2. Must be fairly well documented, should not be too complex to understand and integrate.

like image 960
Swapnonil Mukherjee Avatar asked Oct 20 '08 12:10

Swapnonil Mukherjee


2 Answers

AspectJ as far as I can tell is just a compiler and imposes no dependencies on compiled programs other than including the AspectJ runtime jar.

It is also actively maintained, part of the Eclipse project and has a nice development environment (AJDT, a plugin to Eclipse).

like image 95
Aaron Maenpaa Avatar answered Nov 05 '22 15:11

Aaron Maenpaa


I like Spring + AspectJ. You can do all of your pointcut definitions in xml if you like, and you don't need to change a line of code on your legacy stuff. If you already know spring and AOP concepts, there's not much to learn.

like image 1
Miguel Ping Avatar answered Nov 05 '22 16:11

Miguel Ping