« Television Freedom Day | Main | The Cell chip »
Aspect Oriented Programming

Here's an interesting article about aspect oriented programming (AOP) on O'Reilly's OnJava.com. The first page in particular gives a pretty good background that should answer the questions, "What is aspect oriented programming?" and "Why would I want to use it". Though these questions seem pretty basic, this is the first AOP article I've read that actually addresses them concretely and without claiming the programming world is going to be revolutionized overnight. Now I feel like I understand some of what the fuss is about.

AOP is about applying common behaviors to pieces of code. .NET developers will immediately recognize that some attributes (such as Remoting's OneWay) work in an AOP way already. The attribute changes the behavior of a method without requiring any changes to the code within the method. The article's example of using an aspect to apply stopwatch timing was a great example of a behavior you'd want to be able to easily add and remove from arbitrary methods.

I was concerned, however, that the aspects don't get automatically applied. A separate XML file must contain a mapping for each method to which an aspect is applied even though the aspect attribute exists on the method's source code. This setup seems pretty fragile and cumbersome to maintain, but perhaps other AOP frameworks don't suffer from the same issue.

Overall, an interesting article that should at least enable you to speak intelligently about aspect oriented programming next time it comes up.

Posted by JoshC at March 10, 2005 07:15 PM
Trackbacks
TrackBack URL for this entry:
http://www.joshchristie.com/weblog/mt/mt-tb.cgi/88

Listed below are links to weblogs that reference 'Aspect Oriented Programming' from Josh Christie's Weblog.
Comments
Post a comment









Remember personal info?