Enhancing Object-Oriented Software Development with Delegation
In: Arbeitsberichte des Instituts für Wirtschafts- und Verwaltungsinformatik
Koblenz-Landau: Universität Koblenz-Landau (1997)
Buchaufsatz / Kapitel / Fach: Wirtschaftswissenschaften
In many application domains there are certain aspects that cannot be modelled in an adequate way by using generalisation or common associations (like interaction or aggregation). In those cases delegation often proves to fill this conceptual gap. While delegation has been an important concept in different areas of computer science (mainly within AI) for long, it is not explicitly offered by any of the major object-oriented modelling methods. The following report will introduce a concept of delegation as part of an object-oriented modelling method. First we will analyse why both inheritance and common associations sometimes fail to model certain aspects of the real world. In order to foster the appropriate use of delegation we provide a number of examples together with a checklist. While delegation is primarily a modelling concept it is desirable to have it in place on the implementation level as well. Otherwise one has to deal with the impacts of a semantic gap between model and code. In order to avoid such a gap we suggest a modification of Smalltalk that allows to use delegation in a rather transparent way. Finally delegation is documented as a design pattern.