[aosd-discuss] "AOP considered harmful"
Rickard Öberg
rickard at dreambean.com
Mon Apr 25 14:50:48 EST 2005
Sean Gilbertson wrote:
> It seems that, if your aspects' advice truly target what they're
> meant to address (and the goal of AOP is therefore pursued), then it
> should be obvious where they will act. Perhaps debugging can be more
> complicated - I don't feel qualified to comment, since I haven't used
> AOP enough - but can it really be more complicated or confusing than
> OOP debugging?.
Here's what I've found. The above is a "common sense" interpretation,
IMO, but it breaks down in practice. One of the main points about
pointcuts is that they are declarative. Great. They are also written by
humans, which - being who they are - make mistakes. For example, if you
write a pointcut which you think truly targets what you think your
aspect should apply to, maybe it also covers one or two join points
which you didn't really want to include. Or maybe it covers a couple of
thousand joinpoints which you didn't really want to include. Without
tools to show you the black and white facts about the consequences of
what you just did, there's no way to know.
Because of the inherent power of pointcuts (e.g. being able to effect a
small or large or gigantic part of the system by just changing one or
two words) it will be immensely important that such systems are
supported by tools (for visualization and debugging) that allow the
developer to verify that what he intended to happen does indeed happen -
and nothing more and nothing less.
/Rickard, been there, got burned, moving on :-)
More information about the discuss
mailing list