Designing with inheritance and composition

  • Authors:
  • Omar Alam;Jörg Kienzle

  • Affiliations:
  • McGill University, Montreal, PQ, Canada;McGill University, Montreal, PQ, Canada

  • Venue:
  • Proceedings of the 3rd international workshop on Variability & Composition
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.