Posted by Abhishek on February 12, 2020
Design Patterns has nothing to do with algorithms or programming constructs/concepts (like loops, big-o complexity, etc). Instead, Design Patterns guide you to structure the classes and how they should collaborate.
The goal of embracing Design Patterns is to “Design resuable and extensible object oriented software”.
It is mandatory that every software engineer/programmer should have mastery over Design Patterns. Design Patterns are solutions to a commonly occurring problem.
For example, Undo/Redo is definitely a feature that we implement in almost every application. What’s the most elegant solution to solve this in any application? Well, the answer lies in Design Patterns.
The Design Patterns are documented in the famous book called “Elements of Resuable Object-Oriented Software” by GoF (Gang of Four). Gang of Four are the 4 authors namely Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. The GoF divided the set of 23 design patterns into 3 categories.
Also note that 23 design patterns are the officially documented ones or the classic ones that everybody in the programming world should know. You might come across many unofficial patterns recommended by companies for their products/platforms. So, remember that 23 is not a fixed number in terms of design patterns in the whole world.
Creational | Structural | Behavioral |
---|---|---|
Memento |