Thanks valentin for the links. I have read your blogs on aop and its really cool. I saw the code snippet in your blog and it looks neat. One question that i'm right now finding it difficult to answer is " What is an Aspect? "
So anything cross cutting is an aspect?. At what level does this apply?. Does it need to cut across classes in a package,system or even one class is enough. For eg how did you decide that the notification to the observers needs to be implemented as an aspect.
I mean could it be something like you see some common method being repeatedly called from other methods (in this case all mutators), you would code it as an aspect that applies to that class?
I have been looking at Aspectj for last one week and I was looking for couple of places where i c'd apply aop.
Struts declarative exception handling came to my mind, I thought that can be acheived by writing an 'after' aspect that traps all/some struts Action+.execute( ) methods and checks for the exception type thrown and do something.
We use a
servlet filter too in our app and even that looks like a prime candidate for AOP.
thanks.