Behavioural Patterns
Visitor Pattern in C#
Explains the Visitor Pattern in C# using a company visitor analogy, where different types of visitors interact with departments without modifying them.
Template Method Pattern in C#
Explains the Template Method Pattern in C# using the cake recipe analogy, showing how to define a structure with customisable steps.
Strategy Pattern in C#
Explains the Strategy Pattern in C# using the navigation app analogy, showing how to swap interchangeable algorithms without changing business logic.
State Pattern in C#
Explains the State Pattern in C# using the phone mode analogy, showing how internal state determines behaviour and how to isolate logic with state classes.
Observer Pattern in C#
Explains the Observer Pattern in C# using the YouTube subscription analogy, including how to implement subjects and observers.
Memento Pattern in C#
Explains the Memento Pattern in C# using the save game feature analogy, showing how to capture and restore object state safely.
Mediator Pattern in C#
Explains the Mediator Pattern in C# using an air traffic controller analogy, showing how to decouple objects by routing communication through a central mediator.
Iterator Pattern in C#
Explains the Iterator Pattern in C# using the elevator and floor analogy to show how to move through collections without knowing their internal structure.
Interpreter Pattern in C#
Explains the Interpreter Pattern in C# using the language interpreter analogy, showing how structured input can be evaluated using grammar rules.
Command Pattern in C#
Explains the Command Pattern in C# using the voice assistant analogy to show how requests are wrapped as objects and executed separately.
Chain of Responsibility Pattern in C#
Explains the Chain of Responsibility Pattern in C# using a leave approval analogy to show how requests are passed until someone handles them.