Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Drawbacks of AOP

> 
> Tim says:
> > ... came across an issue that I think needs addressing.
> > 
> > ... The problem is that a programmer looking over some code
> > may not realize that the code is cut by an Aspect.  He may
> > copy the code into another method and the code may or may not 
> > work the same depending on how the pointcut is defined. Or he
> > may make a change to the code not fully realizing the impact
> > of the change because of the pointcut.
> 

...

> 
> The issues with AOP are fundamentally the same.  Good tool
> support lets you know, when you look at some code, that there
> is advice on it.  If you copy the code, this reminder helps
> you decide whether you want to update the advice or not.  In
> future releases of the AspectJ IDE support, things like
> refactorings will even offer to automatically update advice.

I kinda had this issue in mind before too. I even raised the issue on the
refactoring group (the only thread with AOP in subjects). I said that
whenever you need to refactor code with aspects affecting it, you need to
also refactor the aspects. It seems that the tool you are talking about does
not yet exist and won't for some time, but the momentum of refactoring in
today's tools (and today's programmers' culture) should help push things
forward. I just hope you guys at Intentional are doing something about it
;0)

> 
> The tool support doesn't mean that there are no issues, or that
> you can edit AOP code without paying attention at all.  But what
> is true is that the issues involved are very similar to those
> with method calls, and tool support similar to what helps with
> OO helps a lot with AOP.
> 
> If possible, I would suggest you include some slides and/or
> demos of tool support when you explain AOP to people.  Usually
> when people see the concrete ways that the tools help people
> understand their code, many of these concerns go away.


Back to the top