Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Practices regarding aspects

Hello all,

When designing an application containing aspects which affect a number of classes (some in the one
package, some spread across packages), what is the best/common practice?

1. Make no distinction between aspects and classes when placing them in packages. i.e., place
aspects where you feel..

2. Place all aspects affecting that particular package (and its sub-packages) in its own package.
That is, all aspects that affect java.util.regex are placed in java.util.regex.aspects. And all
aspects affecting java.util (and all of its subpackages) in java.util.aspects. [I used aspects in
a small application (~70 classes and 2 aspects) in this fashion.]

3. Place all aspects of an application in a separate package, with a package structure
corresponding to the packages it affects. Like aspects.java.util, aspects.java.util.regex. [I use
this for JUnit tests - test.java.util, test.java.util.regex.]

Technically all of the above may be equivalent (barring visibility/accessibility issues). The
potential issues are design clarity, code clarity, maintainability, separation of
code-responsibility and other such software development concerns. What are you people doing? How
are you placing aspects?

Please post your thoughts / comments.

Thanks,
Balaji

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


Back to the top