In my upcoming articles, we will look each of these patterns in depth with a clear example.
Design Pattern
Design Pattern basically provides an efficient way and architecture for developing an Application. It contains the set of criteria which helps us to build .NET Application in an efficient way. The design pattern solves the users' design problems in the right way and maintains the standard architecture in addition to the code.
About Gang of Four (GOF)
The concept of the design pattern came from the book DesignPattern : Elements of reusable Object Oriented Software. It describes the different 23 design patterns in the software development. The authors are Erich Gamma, Richard Helm, Ralp Johnson and John Vissidles. Thus, these authors are known as the Gang Of Four.
Types of Design Pattern
As I mentioned above, there are 23 design patterns, but they are categorized into three types, as follows:
- Creational Patterns
- Structural Patterns
- Behavioral Patterns
Creational Patterns
Creational patterns deal with problem solving in the creation of the objects. Creational pattern tells us to instantiate the class independently.
There are five such patterns available, which are:
- Abstract Factory
- Builder
- Factory Method
- Object Pool
- Prototype
- Singleton
Structural Patterns
Structural patterns deal with the relationship between the class, objects and their compositions.
There are seven such patterns available, which are:
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Proxy
- Flyweight
Behavioral Patterns
Behavioral patterns provide loose coupling between the algorithm from an object and fewer dependencies in the object creation.This pattern is also explained under the command pattern.
There are eleven such patterns available, which are:
- Chain of responsibility
- Interpreter
- Command
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor