Language Support for Design Patterns

Document type: Researchreports
Full text:
Author(s): Jan Bosch
Title: Language Support for Design Patterns
Series: Research Report
Year: 1995
Issue: 11
ISSN: 1103-1581
Organization: Blekinge Institute of Technology
Department: Dept. of Computer Science and Business Administration (Institutionen för datavetenskap och ekonomi)
Dept. of Computer Science and Business Administration S-372 25 Ronneby
+46 455 780 00
Authors e-mail:
Language: English
Abstract: Design patterns have proven to be useful for the design of object-oriented systems. The power of a design pattern lies in its ability to provide generic solutions that can be specialised for particular situations. The implementation of design patterns has received only little attention and we have identified two relevant problems associated with the implementation. First, the traceability of a design pattern in the implementation is often insufficient; often the design pattern is `lost'. Second, implementing design patterns may present significant implementation overhead for the software engineer. Often, a, potentially large, number of simple methods has to be implemented with trivial behaviour, e.g. forwarding a message to another object. In this paper, the layered object model (LayOM) is presented. LayOM provides language support for the explicit representation of design patterns in the programming language. LayOM is an extended object-oriented language in that it contains several components that are not part of the conventional object model, such as states, categories and layers. Layers are used to represent design patterns at the level of the programming language and example layer types for four design patterns are presented. LayOM is supported by a development environment that translates LayOM code into C++. The generated C++ code can be used as any C++ code for the development of applications. An important aspect of LayOM is that the language itself is extensible. This allows new design patterns to be added to the language model.
Subject: Computer Science\General
URN: urn:nbn:se:bth-00025