Overview
Behavioral patterns characterize complex control flow that is difficult to follow at runtime. They shift your focus away from the flow of control to let you concentrate just on the way objects are interconnected.
Common Patterns
- Observer: Lets you define a subscription mechanism to notify multiple objects about any events that happen to the object they're observing.
- Strategy: Lets you define a family of algorithms, put each of them into a separate class, and make their objects interchangeable.
- Command: Turns a request into a stand-alone object that contains all information about the request.
- State: Lets an object alter its behavior when its internal state changes.
- Iterator: Lets you traverse elements of a collection without exposing its underlying representation.