Types of Design patterns.
Published: 2023-03-24 16:21:38

Software development can be a complex and challenging process, especially when it comes to designing software that is both efficient and maintainable. This is where design patterns come into play. Design patterns are reusable solutions to common software design problems that have been tried and tested over time. These patterns offer developers a set of guidelines that help them to create software that is more flexible, reusable, and maintainable. By using design patterns, developers can write code that is more easily understood and adapted to changing requirements, and can avoid common pitfalls that can lead to errors and bugs. In this article, we will explore the types of design patterns in more detail and examine how they can be used to improve the quality of software design.

In subsequent articles, I will discuss one pattern after the other.

**There are several types of design patterns, including:**

**Creational patterns**: These patterns are used to create objects and provide ways to create objects in a manner suitable for the situation at hand. Examples include
Some of the creational design patterns are as follow:​

1. Singleton Design Pattern
2. Factory Design Pattern
3. Abstract Factory Design Pattern
4. Builder Design Pattern
5. Prototype Design Pattern
6. Object Pool Design Pattern

**Structural patterns**: These patterns focus on the composition of classes and objects to form larger structures. Examples include:

1. Adapter pattern
2. Bridge pattern, 
3. Composite pattern, 
4. Decorator pattern, 
5. Facade pattern, 
6. Flyweight pattern, 
7. and Proxy pattern

**Behavioral patterns**: These patterns are concerned with the interaction and communication between objects and how they operate together to perform tasks. Examples include: 

1. Observer pattern, 
2. Chain of Responsibility pattern, 
3. Command pattern, 
4. Interpreter pattern, 
5. Iterator pattern, 
6. Mediator pattern, 
7. Memento pattern, 
8. State pattern, 
9. Strategy pattern, 
10. Template Method pattern, 
11. Visitor pattern.

**Concurrency patterns**: These patterns are designed to help manage and coordinate concurrent programming tasks and multi-threaded programming paradigm. Examples include:

1. Monitor Object pattern
2. Active Object pattern, 
3. Half-Sync/Half-Async pattern
4. Producer Consumer Design Pattern
5. Leaders/followers pattern
6. Read write lock pattern
7. Balking pattern
8. Scheduler pattern
9. Thread pool pattern
10. Barrier pattern
11. Double-checked locking
12. Guarded suspension pattern
13. Reactor pattern

**Architectural patterns**: These patterns are used to design and organize the structure of large-scale software applications. Examples include: 

1. Model-View-Controller (MVC) pattern, 
2. Model-View-Presenter (MVP) pattern, 
3. Model-View-ViewModel (MVVM) pattern, 
4. Layered architecture pattern, 
5. Microservices architecture pattern.

These are some of the main categories of design patterns, but there are many more specific patterns within each category. Understanding and applying design patterns can help to improve the quality, maintainability, and flexibility of software systems. 

The concept of design patterns has been criticized in several ways. As the right usage of, right design pattern at right place, in right context give the advantages if the above conditioned not satified and worng pattern is been used then it creates mess for the design. So it is atmost important task to choose the right design pattern for specific situations.

**In my upcoming tutorials, I will be taking each patterns one by one using a popular app as a case study**.