Scala Design Patterns.
上QQ阅读APP看书,第一时间看更新

Behavioral design patterns

Behavioral design patterns increase communication flexibility between objects based on the specific ways they interact with each other. Here, creational patterns mostly describe a moment in time during creation, structural patterns describe a more or less static structure, and behavioral patterns describe a process or flow. They simplify this flow and make it more understandable.

The main features of behavioral design patterns are as follows:

  • What is being described is a process or flow
  • The flows are simplified and made understandable
  • They accomplish tasks that would be difficult or impossible to achieve with objects

In this book, we will focus our attention on the following behavioral design patterns:

  • The value object design pattern
  • The null object design pattern
  • The strategy design pattern
  • The command design pattern
  • The chain of responsibility design pattern
  • The interpreter design pattern
  • The iterator design pattern
  • The mediator design pattern
  • The memento design pattern
  • The observer design pattern
  • The state design pattern
  • The template method design pattern
  • The visitor design pattern

The following subsections will give brief definitions of the aforementioned behavioral design patterns.