Reengineering Cocoon with AspectJ
Skip to main content
eScholarship
Open Access Publications from the University of California

Reengineering Cocoon with AspectJ

Abstract

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 [5]. 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.

Pre-2018 CSE ID: CS2001-0682

Main Content
For improved accessibility of PDF content, download the file to your device.
Current View