|
June 2004
[
tirsen
]
11:16, Tuesday, 1 June 2004
I've used AOP more or less actively for almost two years now, and I think I'm really starting to get it. Given that it took me almost 5 years to really master object-orientation I would say AOP is quite a lot easier. (Granted, I learned OOP through C++ which made it a lot harder). Anyway, there's an important design characteristic of AOP that I've been starting to appreciate more lately. Most people talk about AOP as it's all about moving things that has been implemented in several places into one place, and separating things that has been cramped up into one single place into several places. I think there's a different important part to it though. I call it Dependency Inversion on Stereoids. The Dependency Inversion Principle is basically the old OO principle for managing type dependencies in an object-oriented system. Given you have a dependency: But with AOP you have a much more direct and powerful dependency inversion (it's on stereoids!). So from: This is a new powerful design construct, you wouldn't use it all the time but it allows you a new degree of freedom. For example, you could let one team develop a domain model and another team bolt on undo or persistence on it (I know Crazy Bob is doing this).
[
tirsen
]
10:59, Tuesday, 1 June 2004
Adrian Colyer, project lead of AspectJ has written the best motivation for AOP I've ever read. http://jroller.com/page/colyer/20040531#the_ted_neward_challenge_aop Adrian, can you explain the constructs of AOP (joinpoints, pointcuts, advice, etc) in the same way? |