[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Detecting methods being called in the execution of another method (Dale Asberry)
|
The biggest problem is that this code is literally in thousands of
methods. I'd like to implement in a more aspect oriented style, but
there is no management approval and it would take several man-months of
work to refactor the code if/when approval was given. Until then, it
would be nice if I could use aspects in my local environment to find
these contract violations rather than having to spend 2-3 minutes
reviewing each possibility. We're talking 30+ hours just to review
which methods need to be fixed!
Another thing is that your recommendation sounds like the same OO
comments that say I can do everything in aspects with a "better" OO
approach. Yeah, they're right, but it certainly would take a lot of
work.
In addition, using sets to match blocks of code allows for poorly
implemented snippets to be found and rectified with only a small
investment of coding.
The real world tells me that regardless of how "pure" I am in OOP, AOP
or whatever, the code is going to have lots of loose ends. I believe
that these loose ends are crosscutting concerns. If I have a tool that
implements crosscutting concerns, why not extend it to detect and repair
these loose-end issues?
On Tue, 2004-02-24 at 05:00, Matthew Webster wrote:
> This seems to be the classic case of trying to use AspectJ to police
> the existing hand-coded implentation of a cross-cutting concern (in
> your case the use of a JDBC connection manager) versus implementing
> that concern using aspects. I have experienced the same problem when
> trying to police a logging scheme e.g. do both entry & exit exist, are
> we passing the right arguments, etc. AspectJ is good at policing
> statically determinable policies e.g. layered architecture but falls
> short for more dynamic policies as we have seen with declare
> warning/error. I don't think this is a problem. I think it's better to
> implement a complex policy with an aspect than tell a human they are
> getting it wrong although I suspect you may just be using AspectJ in
> your sandbox/build and not deploying it.
>
> Matthew Webster
> AOSD Project
> Java Technology Centre, MP146
> IBM Hursley Park, Winchester, SO21 2JN, England
> Telephone: +44 196 2816139 (external) 246139 (internal)
> Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/