A design pattern is a general reusable solution to a commonly occurring problem in software design.
A design pattern is a description or template that helps solve a reoccurring problem, which can be used in many different situations.
It is common to classify design patterns into the following categories:
- Creational design patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling object creation.
- Structural design patterns ease the design by identifying a simple way to realize relationships between entities.
- Behavioral design patterns identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
- Concurrency patterns deal with the multi-threaded programming paradigm.
Related to design patterns, are architectural patterns. These are often concepts which solve and delineate some essential cohesive elements of a software architecture.