<< Back

What is the history of patterns?


The history of design patterns is rooted in two of the most important software concepts: reusability and maintainability.  Object-oriented software is hard to design; reusable object-oriented software is even more difficult to design.  The catalog of design patterns began as part of Erich Gamma’s PhD. Thesis and was later refined and added to when other software developers jumped on board.  The authors of the first design pattern book are known as the Gang-of-Four.

What is a design pattern?

A design pattern is a solution to reoccurring problem.  Patterns are typically described with four main components:

   1. A pattern name to communicate with others.
   2. A problem that describes when to apply a particular pattern.  For example, it might describe a particular design or algorithm.
   3. A solution describing the elements that makes up the design of the pattern.  The solution provides an abstract description of the pattern.
   4. The consequences of a pattern are the results and trade-offs of applying the pattern.  Usually these consequences are a time and space tradeoff.

How do we classify the patterns?

Pattern Name – Describes pattern in one to two words

Intent – A short summary describing what the pattern does.

AKA – Other known names for the pattern

Motivation – A scenario illustrating a design problem and how the class and object structures in the pattern solve the problem.

Applicability – What are the situations where the pattern can be applied?  How can you recognize these situations?

Structure – A graphical representation of the classes the pattern is using.

Participants – The responsibilities of the classes and objects.

Collaborations – How do the participants interact?

Consequences – What are the tradeoffs?

Implementation – What pitfalls, hints or techniques should you be aware of when implementing a pattern?

Sample Code – Code fragment?

Known Users – Example of the pattern found in a real system.

Related Patterns – What design patterns are closely related to this one?

How do we organize patterns?

Patterns are organized into three different groups: Creational, Structural, and Behavioral.

Creational patterns are concerned with the process of the objects creation.

Structural patterns deal with the composition of classes or objects.

Behavioral patterns characterize the ways in which classes or objects interact.

How are patterns represented graphically?

Patterns are represented using the Unified Modeling Language.  More precisely, class interaction diagrams, and object diagrams.

<< Back