Design Patterns
Behavioral Patterns
Pattern Name Usage
Chain of Responsibility Passes a request along a chain of handlers, where each handler decides either to process the request or to pass it to the next handler in the chain.
Command Encapsulates a request as an object, thereby allowing for parameterization of clients with queues, requests, and operations.
Interpreter Defines a representation of a language’s grammar and uses that representation to interpret sentences in the language.
Iterator Provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Mediator Defines an object that encapsulates how a set of objects interact, promoting loose coupling by keeping objects from referring to each other explicitly.
Memento Captures and externalizes an object’s internal state without violating encapsulation so that the object can be restored to this state later.
Observer Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
State Allows an object to alter its behavior when its internal state changes, appearing to change its class.
Strategy Defines a family of algorithms, encapsulates each one, and makes them interchangeable.
Template Method Defines the skeleton of an algorithm in a method, deferring some steps to subclasses.
Visitor Represents an operation to be performed on the elements of an object structure without changing the classes on which it operates.