Designing with inheritance and composition

Omar Alam, Jörg Kienzle · 2012

Inheritance and composition are two different techniques that allow a modeller to extend the properties of a class. In this paper we highlight the differences of these two closely-related concepts when used in aspect-oriented designs. In particular, we explain that when an aspect wants to extend a base class of a source model, the designer should choose to use composition if she intends the extension to replace the base class. If she intends to define an alternative to the base class with extended functionality, inheritance should be used. We demonstrate the power of the combined use of both techniques by showing an aspect-oriented design of parts of a workflow middleware product line.

Read the paper · More papers on PaperTik