AspectJ is a new Aspect Oriented extension to Java. This study attempts to quantify how appropriate AspectJ is for a large body of open source code (the Cocoon project) by reengineering it. In the process we discovered a number of things. The first is a set of patterns or templates for creating new or converting to AspectJ code. These are outlined and evaluated in the paper. The second is that AspectJ fundamentally changes and simplifies the "Knows About" relationship in a body of code. This simplification has the benefit of fixing the "Reverse Inheritance" problem found in real code. With AspectJ, "Knows About" relationships are localized, and often reduced. This localization removes the need for classes to "Know About" and import secondary behavior. It was also found that AspectJ is a good tool for the expression of Layered programming . This is shown in the implementation of the Layered Aspect type. Finally, it appears that the Cocoon code base was designed with "Aspects" in the abstract, even though they were implemented using Java functionality. This is made especially apparent by the prevalence of reverse inheritance in the code.
The authors of these documents have submitted their reports to this technical report series for the purpose of non-commercial dissemination of scientific work. The reports are copyrighted by the authors, and their existence in electronic format does not imply that the authors have relinquished any rights. You may copy a report for scholarly, non-commercial purposes, such as research or instruction, provided that you agree to respect the author's copyright. For information concerning the use of this document for other than research or instructional purposes, contact the authors. Other information concerning this technical report series can be obtained from the Computer Science and Engineering Department at the University of California at San Diego, firstname.lastname@example.org.
[ Search ]