May 04, 2007
The Value of Pattern ImplementationsGoing beyond pattern specificationsLee Ackerman and Celso Gonzalez
Pattern implementations go one step further than simply using pattern specifications as blueprints.
Lee is a Senior Product Manager with the IBM Rational Learning Services & Solutions team. Celso is a World Wide Analysis, Design, and Construction Community of Practice leader in IBM Rational. They can be contacted at ackerman@ca.ibm.com and cgonzale@ca.ibm.com, respectively.
Over the past decade or so, we've heard about using patterns when designing software solutions. Much of this discussion started with Design Patterns: Elements of Reusable Object-Oriented Software, by Erich Gamma, et al., which showed how to use the patterns concept in software developmentwhere a pattern is a proven solution to a known problem within a given context. The patterns in Design Patterns and books that followed let us improve designs, communicate with others, and learn about design best practices.
The patterns story becomes even more interesting when we look at pattern implementations. In this article, we explore the benefits of pattern implementations.
Pattern Specification versus Pattern Implementation
In the literature, patterns are often described in a formal manner. This description usually includes a detailed description of the pattern, the context to apply the pattern, and the forces that it addresses. This overall information is what is called the "pattern specification" and its purpose is to describe the pattern and help you determine how and when the pattern should be applied. Architects or designers can then use the pattern specification as a model to apply the pattern.
The idea of a "pattern implementation" came from the desire to go further than simply using pattern specifications as a blueprint. As architects, designers, and developers, we continuously look for ways to automate and speed up the mundane and mechanical parts of our work. The pattern implementation is an artifact that allows the codification of a pattern specification and automates its application in a particular environment.
A key point is that pattern implementations can generate many types of artifacts. They can be used to generate UML models, code, or other text-based artifacts such as JSPs, JSF pages, deployment scripts, test scripts, Eclipse project artifacts, and so on. In addition, pattern implementations can be created and used at different phases in the lifecycle as well as at different levels within an application. This means that you can use pattern implementations at high levels of abstraction, such as when you are discussing requirements or performing an initial analysis of a system. It also means that you can use pattern implementations when transitioning from analysis to design, then into an implementationall the while moving from a more abstract representation (a series of models) to a representation that is very specific (code).
Using Rational Software Architect to illustrate, you can see that pattern implementations surface in two ways:
[Click image to view at full size]
Figure 1: The upper part shows the pattern implementation; the lower part shows the classes and relationships generated by the pattern implementation.
[Click image to view at full size]
Figure 2: Mapping transformation that generates a <<Boundary>> class in the analysis model for every Actor.
Creating pattern implementations is possible only because of the convergence of three streams with IT thinking, namely: Pattern Specifications, Model-Driven Development (MDD), and Metatooling.
|
|
||||||||||||||||||||||||||||||
|
|
|
|