Low-Level Design — Intro to Design Patterns
So In this post, I am going to explain design patterns, as we all know design patterns are very important for solving the most common type of problems in any application development.
Suppose we want to develop an application, so there are a lot of problems which are already being solved and they are common for every application which we develop.
So As we know Design Patterns are mainly belonged to Three Categories and based on the requirement we have created these categories.
- Creational
- Behavioural
- Structural
So in the creational design pattern, we basically create the object of different types of classes as per our use cases.
While creating the object we can create in multiple ways but with the help of design patterns, we will create objects which are very efficient.
In Java for creating the object, we use a new keyword. But using it everywhere is not efficient, and hardcoding is not recommended in development, so it is important to follow the patterns and use them to create the objects.
Factory Pattern
Abstract Factory Pattern
Singleton Pattern
Builder Pattern
Prototype Pattern
Object Pool Pattern
In Behavioural design patterns, we are concerned about the interaction and responsibility of objects.
In these design patterns, the interaction between the objects should be in such a way that they can easily talk to each other and still should be loosely coupled.
Observer Pattern
Strategy Pattern
Null Object Pattern
Chain of Responsibility Pattern
Structural design patterns are concerned with how classes and objects can be composed, to form larger structures.
The structural design patterns simplify the structure by identifying the relationships.
These patterns focus on, how the classes inherit from each other and how they are composed of other classes.
This pattern mainly focuses on relationships between objects which will be used for creating larger structures.
Adapter Pattern
Bridge Pattern
Composite Pattern
Decorator Pattern
Proxy Pattern
So these are the basic patterns and their types. Next, we need to discuss each of them in detail.
Thanks for reading!!