A design pattern names, abstracts, and identifies the key aspects of a common design structure that make 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 responsibilites. Each design pattern focuses in a particular object or issue. It describes when it applies, whether it can be applied in view of other design constraints, and the consequences and trade-offs of its use.
A pattern has four essential elements:
- Pattern name to describe a design problem, its solutions, and consequences in a word or two.
- Problem describes when to apply the pattern. It explains the problem and its context.
- Solution describes the elements that make up the design, their relationships, responsibilites, and collaborations. The solution does not describe a particular concrete design or implementation, because a pattern is like a template that can be applied in many different situations.
- Consequences are the results and trade-offs of applying the pattern. They are critical for evaluating design alternatives and for understanding the costs and benefits of applying the pattern (space and time trade-offs, reusablility).
- Design Patterns : Elements of Reusable Object-Oriented Software
- SourceMaking
- tutorialspoint
- dofactory