Design Patterns as Language Constucts
|Title:||Design Patterns as Language Constucts|
|Organization:||Blekinge Institute of Technology|
|Department:||Dept. of Telecommunications and Mathematics (Institutionen för telekommunikation och matematik)
Dept. of Telecommunications and Mathematics S-371 79 Karlskrona
+46 455 780 00
|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 pa
rt 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.