Behavioral Patterns 

Behavioral Design Patterns

In software engineering, behavioral design patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
Behavioral patterns influence how state and behavior flow through a system. By optimizing how state and behavior are transferred and modified, you can simplify, optimize, and increase the maintainabilty of an application.
Below is a list of common behavioral design patterns.
  1. Chain of responsibility: Command objects are handled or passed on to other objects by logic-containing processing objects
  2. Command: Command objects encapsulate an action and its parameters
  3. Interpreter: Implement a specialized computer language to rapidly solve a specific set of problems
  4. Iterator: Iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation
  5. Mediator: Provides a unified interface to a set of interfaces in a subsystem
  6. Memento: Provides the ability to restore an object to its previous state (rollback)
  7. Observer: also known as Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object
  8. State: A clean way for an object to partially change its type at runtime
  9. Strategy: Algorithms can be selected on the fly
  10. Template Method: Describes the program skeleton of a program
  11. Visitor: A way to separate an algorithm from an object

Ad Gang of Four Patterns


  1. Externalize the Stack:Turn a recursive function into an iterative one that uses a stack.
  2. Hierarchical visitor: Provide a way to visit every node in a hierarchical data structure such as a tree.
  3. Null Object: Designed to act as a default value of an object
  4. Protocol Stack: Communications are handled by multiple layers, which form an encapsulation hierarchy.
  5. Scheduled-task: A task is scheduled to be performed at a particular interval or clock time (used in real-time computing)
  6. Single-serving visitor: Optimise the implementation of a visitor that is allocated, used only once, and then deleted
  7. Specification: Recombinable Business logic in a boolean fashion
  8. Weak reference: De-couple an observer from an observable.