Dr. David J. Pearce

Relationship Aspects

Author(s). David J. Pearce and James Noble.

Venue. In Conference on Aspect-Oriented Software Development (AOSD), pages 75--86, 2006. ©ACM Press

Abstract: The relationships between objects in object-oriented programs are as important as the objects themselves. Unfortunately, most object-oriented programming languages provide little support for such relationships, leaving the task of implementing them entirely to the programmer. Relationships are typically hard-coded into the participating classes, resulting in tangled code that unnecessarily couples these classes together. The classes become harder to understand and cannot be reused independently. Aspect-oriented programs can model relationships explicitly, treating them as separate concerns that cross-cut their participants. We show how relationships can be implemented as a library of aspects in Aspect/J. Aspects keep relationships independent of their participants, making the resulting programs easier to read, write and reuse, and as efficient as hand-written code.