Design Pattern

 
In software engineering, a software design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

For example, to create a class for which only a single instance should be created and that single object can be used by all other classes, we can use Singleton design pattern.

Design patterns were originally grouped into the categories: creational patterns, structural patterns, and behavioral patterns.
 

Creational Pattern

 
These patterns mainly deal with the instantiation process.

Here we make the systems independent from how their objects are created, collected, or represented.
 

 

Structural Pattern

 
Here we focus on how objects and classes are associated or can be composed to make relatively large structures.
 

 

Behavioral Pattern

 
Behavioral patterns are concerned with the assignment of responsibilities between objects, or, encapsulating behavior in an object and delegating requests to it.