Design Patterns

Related Subjects:


The first mention of design patterns in relation to software was made in 1987 by Kent Beck and Ward Cunningham ( who also invented CRC Cards ). The idea of design patterns then kicked around for a few years, but became popular in 1994, with the classic text "Design Patterns: Elements of Reusable Object-Oriented Software", edited by Erich Gamma, Richard Helm, et al.

The Wikpedia defines a design pattern as "a general repeatable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations".

Since 1994, the number of design patterns has proliferated but for the most part, they have remain true to Gamma's original classification identifing three types of design patterns - structural, behavioral and creational patterns. The creational patterns are roughly equivalent to the functional component of the function-structure-behavior model. An example of a structural pattern is a "Composite", which composes individual objects into a collection, often represented as a hierarchical "tree" structure.

An example of a behavior is the "Mediator" pattern, which determines how two objects interact independently of the object themselves, decoupling explicit references to one another, somewhat like a business rule.