Thursday, September 30, 2004

New aspect on programming

Tom Janofskky, professional consultant, and Penn State professor gave a presentation this evening on AspectJ, a java language based framework for aspect oriented programming. Aspect Oriented Programming or AOP is a new contribution to the programming world that makes up for some of the inflexibility in traditional OOP scenarios. AOP has the ability cut across a solution to add new functionality that would be very challenging to do in large OOP design. By linking to methods and higher elements such as classes and interfaces at runtime, object checks and new functionality can be added on the fly. For a better introduction, check out Tom's web site at http://www.tomjanofsky.com. AOP seems to have some obvious advantages especially for debugging and logging, but its still unclear whether I would actually plan a design around this technology. Most of Tom's examples centered on "rescuing" already deployed applications or adding new functionality by declaring an aspect file that attaches or weaves directly into the java class file. This weaving can be accomplished by inputting any java class file and an aspect file to create an executable. One obvious advantage is the separation of the aspect code from your normal code base. This makes adding and removing debugging information much easier. I'm really tempted to try this out in a nonobtrusive scenario. The tool looks very powerful, however there are many uncertain areas in AOP. There is still a lot undecided in terms of how AOP can and should be used, as well as the difficulty in maintaining AOP code that has almost invisibly attached "advice" information.

No comments: