Hello there! This repository contains many examples that I created during my journey of learning design patterns. The main objective was to apply the knowledge gathered about each pattern.
The examples for each design pattern works in the following way:
- Firstly, there is a scenario which doesn't apply any design pattern (commonly some ugly and/or boilerplate code), this is called the Before example.
- Aftewards, there will be an example showing the code after the appropriate pattern is applied in it, while also having a brief explanation of how the the pattern works and how ou code benefits from it. This is called the After example.
The explanations and notes are written in english and are mostly centered at the Client classes. There will always be two clients: the ClientBefore (which contains the example before applying the pattern) and the ClientAfter (which contains the example after applying the pattern).
- β Chain Of Responsibility
- π Command
- π Iterator
- π Mediator
- πΎ Memento
- π Observer
- βοΈ State
- βοΈ Strategy
- π Template Method
- β‘οΈ Visitor
Those are the places where I studied and also took many of the examples to create my own: