July 21, 2003

Aspect-Oriented Programming

Jon Udell introduces me to Aspect-Oriented Programming...

"By way of example, Lee imagines a development shop where the policy is that methods, in any class, must invoke a logger on entry and exit. AOPers call this kind of requirement a "crosscutting concern," meaning that it affects classes without regard to their kinship in the class hierarchy. You can make a rule that programmers have to call the logger from every class, but there's no easy way to ensure that they'll do it at all, nevermind correctly. The AOP solution is to define a pattern that matches the set of methods that should call the logger, and to rewrite the code automatically so they do. That's what happens under the covers, anyway, but the idea is that the person who'd like to enforce the policy simply declares it, and tools make it so"

Having recently done just that, by hand, whilst investigating a performance problem, the idea of a tool that does it for me is quite appealing :-) Still early days in terms of tools I think, but hopefully they'll come in time.

Update: Fixed link so it actually went to Jon's page. Not sure how I managed to delete that...

Posted by Adrian at July 21, 2003 12:07 PM | TrackBack

This blog post is on the personal blog of Adrian McEwen. If you want to explore the site a bit further, it might be worth having a look at the most recent entries or look through the archives or categories over on the left.

You can receive updates whenever a new post is written by subscribing to the recent posts RSS feed or

Post a comment

Remember personal info?

Note: I'm running the MT-Keystrokes plugin to filter out spam comments, which unfortunately means you have to have Javascript turned on to be able to comment.