
Chain of Responsibility is a behavioral design pattern that lets you avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
Command is a behavioral design pattern that lets you turn a request into stand-alone object, which can be used to parametrize objects with different requests, queue or log requests, and support undoable operations.
Iterator is a behavioral design pattern that lets you access the elements of an aggregate object sequentially without exposing its underlying representation.
Mediator is a behavioral design pattern that lets you define an object that encapsulates relations between a set of objects to make them independent of each other.
Observer is a behavioral design pattern that lets you define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
State is a behavioral design pattern that allows an object to alter its behavior when its internal state changes. The object will appear to change its class.
Strategy is a behavioral design pattern that lets you define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.
Template Method is a behavioral design pattern that lets you define the skeleton of an algorithm and allow sub-classes to redefine certain steps of the algorithm without changing its structure.
Visitor is a behavioral design pattern that lets you define a new operation without changing the classes of the objects on which it operates.
In this course, we will discuss what are behavioral design patterns. We will get a high level overview of what are these patterns and we will see why it is important to have these patterns. Later on, we will do a deep dive in these patterns and go through all the design patterns which are part of these categories.
Chain of responsibility
Command
Iterator
Mediator
Memento
Observer
State
Strategy
Template
Visitor
We will discuss all these patterns mentioned above in a great detail, and we will code along and understand what problems they are solving.
Let's get started!
Links to source code is provided at the bottom of the introduction section.