Pushing the envelope

Darren's take on Java, agile methods, cool open source stuff, interesting technologies and other random wanderings through the land of blog.
Updated: 26/01/2003; 11:49:00.
Places to go
Apache Jakarta Project
c2.com
ExtremeProgramming.org
OpenSymphony
XProgramming.com
XP Developer

People to see
Russell Beattie
Eugene Belyaev
Tony Bowden
Mike Cannon-Brookes
Jeff Duska
Paul Hammant
Scott Johnson
Brett Morgan
Rickard Öberg
James Strachan
Joe Walnes

Things to do

Subscribe to "Pushing the envelope" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


That was the day
October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov



Archives
December 2002
November 2002
October 2002
September 2002
August 2002

Listening To


Valid RSS

Click here to visit the Radio UserLand website.

  28 October 2002

AOP Explained

Another useful AOP article here.


1:03:49 PM      comment []

Aspects == Indirection ^2

Jumping back on the aspects bandwagon (trying to explain something often helps me to understand it):

Indirection, aka abstraction: You call a method on an interface, and the recipient is determined at runtime, and may be at the end of several 'middlemen' who simply pass the message along. What AOP does for you is allow you to dynamically compose a whole method call chain using reusable interceptors. So calling setFoo() on something that appears to be a simple bean can actually take a quick detour to your validation interceptor to check the syntax, then visit the persistence interceptor, telling it that the field is dirty, before returning. This is nothing that can't already be done without AOP, but AOP (ie. interceptors & extensions) appears to be much more flexible and reusable. Being able to define your interceptor stack in a descriptor or programmatically means you can substantially alter the behaviour of bits of your application while its running, and the calling code still sees a simple 'setFoo' bean like interface. And the possibilities for code reuse look huge.

Of course, I could be entirely wrong - I'm still trying to wrap my brain around the concept.


10:03:19 AM      comment []

© Copyright 2003 Darren Hobbs