What are Design Patterns (later DPs)? DPs are typical solutions to problems that occur often when developing software, more specifically in the design phase. They describe a recurring problem and the way to solve it as well as the consequences of applying it.
There exist three types of DPs:
- Creational: they describe the way objects are instantiated;
- Structural: they are concerned with the way objects are composed;
- Behavioural: they define the way objects behave and interact between themselves.
Every folder of this repo represents a DP and includes:
- a theoretical explanation of the problem it solves and how;
- a UML representation of the pattern. Use PlantText to copy-paste the PlantUML code of each DP;
- a description of the elements of the pattern;
- a code example in C++. You will need
g++
(sudo apt install g++
) to be able to compile the code examples (instructions to compile and run the code are provided).
This repo is based on "Design Patterns - Elements of Reusable Object-Oriented Software" written by Erich Gamma, Richard Helm, Ralph Johnson & John Vlissides (Pearson).