What are Design patterns ?
Description of Communicating Objects and classes that are customised to solve a general problem in a particular context.
As per the official Definition...
In Simple Words..
They are patterns or templates , that can be implemented to solve a problem in different particular solutions...
Design Patterns Superpowers (Why are they required ?)
Design Patterns enforces SOLID principles
SOLID is a set of object oriented design principles aimed at making code more maintainable and flexible
Categorisation of GoF (Gang of Four Design Patterns)
Any Idea why are they called GoF (Gang Of Four Design Patterns)?
Design Patterns with Drupal 8
We will cover ...
Singleton Design Pattern (The Creational Pattern)
Use Singleton Pattern and You will get ...
Factory Design Pattern (The Creational Pattern)
Factory Method defines a method, which should be used for creating objects instead of direct constructor call. Subclasses can override this method to change the class of objects that will be created.
UML Explanation
Mediator Design Pattern (The behavioural Pattern)
Mediator is a behavioural design pattern that reduces coupling between components of a program by making them communicate indirectly, through a special mediator object.
UML Explanation
Services and Dependency Injection in Drupal 8
References