Design Patterns as Language Constructs

Document type: Journal Articles
Article type: Original article
Peer reviewed: Yes
Author(s): Jan Bosch
Title: Design Patterns as Language Constructs
Journal: JOOP - Journal of Object-Oriented Programming
Year: 1998
Volume: 11
Issue: 2
Pagination: 18
ISSN: 0896-8438
Publisher: SIGS Publications
City: New York, N.Y
ISI number: 000073194200005
Organization: Blekinge Institute of Technology
Department: Dept. of Computer Science and Business Administration (Institutionen för datavetenskap och ekonomi)
*** Error ***
+46 455 780 00
*** Error ***
Authors e-mail:
Language: English
Abstract: Design patterns are useful for the design of object oriented systems. The power of design patterns stems from their ability to provide generic solutions to reappearing problems that can be specialized for particular situations. The implementation of design patterns however, has received little attention. We identify four problems associated with their implementation using conventional object oriented languages. First, the traceability of a design pattern in the implementation is often insufficient; the design pattern is "lost". Second, because several patterns require an object to forward messages to other objects to increase flexibility, the self problem often occurs. Third, because the pattern implementation is mixed with the domain class, the reusability of pattern implementations is often limited. Finally, implementing design patterns may present significant implementation overhead for the software engineer. Often, a potentially large number of simple methods must be implemented with trivial behavior. A solution to these problems is presented in the context of the layered object model (LayOM). LayOM provides language support for the explicit representation of design patterns in the programming language. LayOM is an extended object oriented language which contains several components that are not part of the normal object model, such as states, categories and layers. Layers are used to represent design patterns at the level of the programming language. Example layer types for eight design patterns are presented. Because LayOM is an extensible language, the software engineer may extend the language model with abstractions for other design patterns
Subject: Software Engineering\General
Keywords: abstract data types, object-oriented languages, object-oriented programming, software reusability