Design Patterns - SPLessons

Behavioural Pattern

Chapter 18

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Behavioural Pattern

Behavioural Pattern

shape Description

Behavioral Pattern explains how objects interact with each other. The flexibility of the system can be increased using Behavioral Pattern. In this pattern, inheritance usability is decreased and composition is followed. Behavioral Pattern is classified into 12 types, they are:

Chain Of Responsibilities Pattern

Chain of Responsibilities comes under Behavioural Pattern. In this, single pipeline is used and that pipeline contains all possible operations. A request can be easily passed among the objects.

Mediator Pattern

Behavioural Pattern – Mediator pattern is used to reduce the complexity in coding when a large number of classes are being used.

Visitor Pattern

Behavioural Pattern – Visitor Pattern can be used to add extra features to a class.

Command Pattern

Command Pattern takes object as a request and stores it for future use.

State Pattern

State pattern is used to change the behavior of the Object. When the state changes, the behavior of the object also changes.

Momento Pattern

Momento Pattern is used to save the internal state of an object so that one can restore and use it.

Observer Pattern

Observer Pattern is used to map one to many relationships.

Iterator Pattern

Iterator Pattern uses a common interface through which one can navigate to a set of data.

Strategy Pattern

Using Strategy Pattern an algorithm can be encapsulated inside a class.

Interpreter Pattern

Using Interpreter Pattern one can easily understand the language.

Template Pattern

Using Template Pattern, one can define an algorithm in one class and implement in another class.

Null Object Pattern

Null Object Pattern is used to assign default values to an object.


shape Key Points

  • Behavioural Pattern are concerned with the interaction and responsibility of objects.
  • Command Pattern is a behavioral pattern and a data driven pattern.
  • Command pattern is also known as “Action” or “Transaction”.