Separating Crosscutting Concerns Across the Lifecycle: From
Composition Patterns to AspectJ and Hyper/J
Siobhán
Clarke and Robert
J. Walker.
Technical report TCD-CS-2001-15, Department of Computer Science, Trinity College, Dublin, Ireland, and technical report UBC-CS-TR-2001-05, Department of Computer Science, University of British Columbia, Vancouver, Canada, 23 May 2001.
To remove scattering and tangling properties, a means to separate the designs and code of crosscutting behaviour into independent models or programs is required. This paper discusses approaches that achieve exactly that in either designs or code, and presents an investigation into a means to maintain this separation of crosscutting behaviour seamlessly across the lifecycle. To achieve this, we work with composition patterns at the design level, AspectJ and Hyper/J at the code level, and investigate a mapping between the two levels. Composition patterns are a means to separate the design of crosscutting requirements in an encapsulated, independent, reusable, and extensible way. AspectJ and Hyper/J are technologies that provide similar levels of separation for Java code. We discuss each approach, and map the constructs from composition patterns to those of AspectJ and Hyper/J. We first illustrate composition patterns with the design of the Observer pattern, and then map that design to the appropriate code. As this is achieved with varying levels of success, the exercise also serves as a case study in using those implementation techniques.
Superceded versions of this paper
URL: | http://www.cs.ubc.ca/labs/se/papers/2001/TCD-CS-2001-15.html |
File: | /pub/www/cs.ubc.ca/docs/labs/se/papers/2001/TCD-CS-2001-15.html |