A design pattern names, abstracts, and identifies the key aspects of a common design structure that makes it useful for creating a reusable object-oriented design. The design pattern identifies the participating classes and instances, their roles and collaborations, and the distribution of responsibilities.
- Pattern Name. Used to describe the design problem, solution and consequences in a word or two.
- Problem. Describes when to apply a certain pattern and explains the problem to be solved and its context. Sometimes, it includes a list of conditions to be met before a pattern can be applied
- Solution. Provides an abstract description of the problem and how a general arrangement of elements, i.e. classes, interfaces and objects can solve it. It is not specific to a certain language or implementation because a design pattern acts like a template that can be applied in many situations.
- Consequences. Pertains to the limits and trade-offs of applying a design pattern. These usually involve space and time trade-offs. The consequences of a pattern may involve the system's flexibility, portability or extensibility.