A brief Pattern Catalog
Patterns include Design Patterns, Analysis Patterns, and Architectural
Patterns. Additionally, these patterns can be classified according to their
intentional area of application.
Design Pattern Catalog
(Class) Creational Patterns
- Factory Method
- Define an interface for creating an object, but let subclasses decide
which class to instantiate. Factory Method lets a class defer instantiation
to subclasses.
Varying: subclass of object that is instantiated.
(Object) Creational Patterns
- Abstract Factory
- Provide an interface for creating families of related or dependent objects
without specifying their concrete classes.
Varying: families of product objects.
- Builder
- Separate the construction of a complex object from its representation so
that the same construction process can create different representations.
Varying: how a composite object gets created.
- Prototype
- Specify the kinds of objects to create using a prototypical instance, and
create new objects by copying this prototype.
Varying: class of object that is instantiated.
- Singleton
- Ensure a class only has one instance, and provide a global point of access
to it.
Varying: the sole instance of a class.
(Class) Structural Patterns
- Adapter (class)
- Convert the interface of a class into another interface clients expect.
Adapter lets classes work together that couldnt otherwise because of
incompatible interfaces.
Varying: interface to an object.
(Object) Structural Patterns
- Adapter (object)
- Convert the interface of a class into another interface clients expect.
Adapter lets classes work together that couldnt otherwise because of
incompatible interfaces.
Varying: interface to an object.
- Bridge
- Decouple an abstraction from its implementation so that the two can vary
independently.
Varying: implementation of an object.
- Composite
- Compose objects into tree structures to represent part-whole hierarchies.
Composite lets clients treat individual objects and compositions of objects
uniformly.
Varying: structure and composition of an object.
- Decorator
- Attach additional responsibilities to an object dynamically. Decorators
provide a flexible alternative to subclassing for extending functionality.
Varying: responsibilities of an object without subclassing.
- Facade
- Provide a unified interface to a set of interfaces in a subsystem. Façade
defines a higher-level interface that makes the subsystem easier to user.
Varying: interface to a subsytem.
- Flyweight
- Use sharing to support large numbers of fine-grained objects efficiently.
Varying: storage costs of objects.
- Proxy
- Provide a surrogate or placeholder for another object to control access to
it.
Varying: how an object is accessed; its location.
(Class) Behavioral Patterns
- Interpreter
- Given a language, define a representation for its grammar along with an
interpreter that uses the representation to interpret sentences in the
language.
Varying: grammar and interpretation of a language.
- Template Method
- Define the skeleton of an algorithm in an operation, deferring some steps
to subclasses. Template Method lets subclasses redefine certain steps of an
algorithm without changing the algorithms structure.
Varying: steps of an algorithm.
(Object) Behavioral Patterns
- Chain of Responsibility
- Avoid coupling the sender of a request to its receiver by giving more than
one object a chance to handle the request. Chain the receiving objects and
pass the request along the chain until an object handles it.
Varying: object that can fulfill a request.
- Command
- Encapsulate a request as an object, thereby letting you parameterize
clients with different requests, queue or log requests, and support undoable
operations.
Varying: when and how a request is fulfilled.
- Iterator
- Provide a way to access the elements of an aggregate object sequentially
without exposing its underlying representation
Varying: how an aggregate's elements are accessed, traversed.
- Mediator
- Define an object that encapsulates how a set of objects interact. Mediator
promotes loose coupling by keeping objects from referring to each other
explicitly, and it lets you vary their interaction independently.
Varying: how and which objects interact with each other.
- Memento
- Without violating encapsulation, capture and externalize an objects
internal state so that the object can be restored to this state later.
Varying: what private information is stored outside an object, and when.
- Observer
- Define a one-to-many dependency between objects so that when one object
changes state, all its dependents are notified and updated automatically.
Varying: number of objects that depend on another object; how the dependent
objects stay up to date.
- State
- Allow an object to alter its behavior when its internal state changes. The
object will appear to change its class.
Varying: states of an object.
- Strategy
- Define a family of algorithms, encapsulate each one, and make them
interchangeable. Strategy lets the algorithm vary independently from clients
that use it.
Varying: an algorithm.
- Visitor
- Represent an operation to be performed on the elements of an object
structure. Visitor lets you define a new operation without changing the
classes of the elements on which it operate.
Varying: operations that can be applied to object(s) without changing their
class(es).
Additional Design Patterns (not yet classified)
Layer Architecture, Repository, Pipes and Filters, Event Channel, ADT,
Module, Framework, Superclass, Blackboard, Master/Slave, Process-Control,
Rule-Based Interpreter.
Analysis Pattern Catalog
- List
- A consits of a lot of B.
- "Exemplartyp"
- Multiple occurrences B of a type A.
- "Baugruppe"
- A physically consits of A1, and A2.
- "Stückliste"
- A may consist of multiple As.
- Coordinator
- A coordinator is a resolved n-ary association class.
- Roles
- A plays multiple roles with respect to B.
- Changing Roles
- A plays different roles with respect to B at different times.
- History
- Document multiple facts that were true of A at different times.
- Group
- Multiple A constitute a single group at the same time.
- History of a Group
- Multiple A constitute different groups at different times.
Design Pattern Categories
-
- Object pattern
- Class pattern
-
- Creational
- Structural
- Behavioral
-
- Decoupling
- Variants
- State-handling
- Control
- Virtual Machine
- Convenience
References
- Patterns Home Page
- Gamma, E., R. Helm, R. Johnson, and J. Vlissides. Design Patterns:
Elements of Reusable Object-Oriented Software. Reading, MA: Addison-Wesley,
1995
- Buschmann, F., R. Meunier, H. Rohnert, P. Sommerlad, M. Stal.
Pattern-Oriented Software Architecture: A System Of Patterns. West Sussex,
England: John Wiley & Sons Ltd., 1996
- Fowler M. Analysis Patterns - Reusable Object Models. Menlo Park:
Addison-Wesley, 1997.
- Coad, P. Object-Oriented Patterns, in: Communications of the ACM,
September 1992, p. 152-159.
- Coad, P., North, D., Mayfield, M. Object Models, Strategies, Patterns, and
Applications. Englewood Cliffs: Yourdan Press, Prentice Hall, 1995.
- Balzert, Heide. Lehrbuch der Objektmodellierung - Analyse und Entwurf.
Heidelberg: Spektrum Akademischer Verlag, 1999.
- Coad P. The Coad Letter. Rösch Consulting, April 1992.
- Walter F. Tichy. ...
- a Pattern
Catalog with descriptions.