Video Tutorial: https://www.youtube.com/watch?v=EaSfSQ5emow&t=1s
The factory Pattern is a type of creational design pattern. One of the most used design patterns. It is used to hide the object's creational logic.
Abstract Factory is a type of creational design pattern. This pattern uses super-factory(factory of factories) that create other factories. It is used to abstract the object creation.
The Singleton Pattern is a type of creational design pattern. One of the easiest design patterns. When we need to have only one instance of our class we can use a singleton pattern. For example, creating a DB connection once and sharing it in multiple objects rather than creating new connections every time.
Decorator pattern is a type of structural design pattern. Decorator pattern allows us to add new functionality to an existing object without altering its structure. This pattern acts as a wrapper to an existing class.
This pattern creates a decorator class which wraps the original class and provides additional functionality keeping class methods signature intact.
Video Tutorial: https://www.youtube.com/watch?v=38Hy7-sv_Zw
Observer pattern is a type of Behavioural design pattern. Observer pattern is used when one of the objects is modified and we want to notify multiple objects about the event that has occured. This pattern has two main actors i.e. Subject and Observer.