Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] need suggestion on how to deal with anti-aspectj people :(

First, make sure your pointcuts are as specific as possible. This makes them less robust (what if you rename something?), but this step will reduce the build impact when changes are made. One way to focus the pointcuts, yet not compromise robustness too much is to use annotations or interfaces to mark the classes that should be advised. This is usually better than referring to concrete class details, any most cases.

However, since you said you have many dependencies, I suspect you have too many dependencies that are causing general problems; the aspects are just making the situation a lot worse. How manay dependencies are there between your packages? Are your build times fairly long even without aspects? Is it hard to enhance the software without impacting many other packages and classes? Do you and your colleagues often "step on each other" when working on independent changes? Are merges to the build "branch" of your version control system a pain? Any of these may be symptoms of dependency problems.

Consider using a tool to analyze your application's dependencies. For example, "jdepend" from clarkware.com is free. It's worth the trouble to follow the instructions for generating PNG images, which I find more useful. Once you see what dependencies you have, Try to eliminate any circular dependencies and also try to make packages that are used by many other packages as stable as possible. You'll find that you need to break up packages, even packages that otherwise seem to be "one thing". You should notice your build times decrease and it may even solve the aspect build issue, all by itself.

Good luck,

Dean

Marco Mistroni wrote:
hi all,
i have developed a project using aspectj, because i had a business rule that needed to be applied in various layers of
the application.
Only problem is that, every time in my RAD i change the code of a class that is affected by an aspect, aspectj plugin for eclipse recompile the whole project (aind since i have many dependencies, it ends up recompiling all projects in my workspace)

many of my colleagues are pissed off for this, and they want to drop aspectj because 'it takes hell lot of time to compile, surely if we write a class with the business rule, and call it from every part in the code where is needed, we can achieve the same effect without having the compilation hell'

beside that with this idea we need to add one extra parameter for every single method where we need to apply the business rule (should be a pain, but withh eclipse quick-and-fix shortcuts that refactor all methods where you need to add an extra parameter, everything is easy), i haven't found any arguments to counterattack.....

anyone can give me some please?
i have said that with aspectj, you wouldn't need to change any signle line of code to apply a business rule, because everything is coded into aspect... but to them, this is not enough....

thanks and regards
 marco
------------------------------------------------------------------------

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


--
Dean Wampler, Ph.D.
dean at aspectprogramming.com
objectmentor.com <http://www.objectmentor.com>
aspectprogramming.com <http://www.aspectprogramming.com>
contract4j.org <http://www.contract4j.org>

I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.
Application Terminated.
Okay 	Cancel



Back to the top