We use design patterns so that we don’t have to write repeated code again and again for same kind of problem. Design pattern is not a class or piece of code. Its a template which should be implemented based on the situation.
Design patterns are divided into following categories:-
As the name explain, Behavioral patterns describe how the objects behave when they interact with each other and it focus on how objects communicate with each other.
Behavioral patterns can be divided further into following types:
- Chain of Responsibility
- Template Method
- Null Object
As the name explain, Creational Pattern describe how do we create objects. It hides the complexity of object creation. Creational Pattern can be further divided into following categories.
Structural patterns are concerned with how classes and objects are composed to form larger structures. Structural Pattern can be further divided into following categories.