{"title":"Designing with inheritance and composition","authors":"Omar Alam, J. Kienzle","doi":"10.1145/2161996.2162002","DOIUrl":null,"url":null,"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.","PeriodicalId":198579,"journal":{"name":"VariComp '12","volume":"15 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-03-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"VariComp '12","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2161996.2162002","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7
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.