CSC/ECE 517 Fall 2009/wiki2 12 Schemes for Pattern Classification
Overview
Design patterns in software engineering is a time-tested reusable solution to recurring problems in software design. The origin of design patterns can be owed to the work of civil engineer Christopher Alexander, who documented his resolution to design issues in constructing buildings and towns[1]. About a decade and a half ago, software professional began to incorporate Alexanders ideas into guides for novice developer. From then on design patterns became increasingly popular.
Schemes for Pattern Classification
Gamma et al.
Design Patterns gained popularity with the book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published in 1995. In their work they used 2 criteria to categorize 23 design pattern[2].
- What does the pattern do?
- Structural - These patterns deal with the composition of classes and their object.
- Creational - These patterns deal with object creation.
- Behavioral - These patterns deal with the interaction between classes and object and how they delegate responsibility.
- What is the scope of the pattern?
- Class - The patterns deal with the relationships between classes and their subclasses. These are more static and fixed at compile time.
- Object - These patterns deal with object relationship. They are more dynamic and can vary at runtime.
Purpose | ||||
Scope | Creational | Structural | Behavioral | |
Class | Factory Method | Adapter (class) | Interpreter | |
Template Method | ||||
Object | Abstract Factory | Adapter (object) | Command | |
Builder | Bridge | Iterator | ||
Singleton | Decorator | Memento | ||
Facade | Observer | |||
Flyweight | State | |||
Proxy | Strategy | |||
Visitor | ||||
Chain Of Responsibility |