Design patterns are are evolved as reusable solutions to the problem that we encounter every day of programming.
They are generally targeted at solving the problems of object generation and integration.
These generalized patterns act as template that can be applied to the real-world problems.
There are 3 types of Design Patterns.
- Creational : This type deals with the object creation and initialization. This pattern gives the program more flexibility in deciding which objects need to be created for a given case. e.g: Singleton, Factory, Abstract Factory ..etc.
- Structural : This type deals with class and object composition. This pattern focuses on decoupling interface and implemetaion of classes and its objects. e.g: Adapter, Bridge ..etc.
- Behavioural : This type deals with the communication between Classes and Objects. e.g: Chain of Responsibility, Command, Intepreter ..etc.