O'Reilly logo

Protocol-Oriented Programming with Swift by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Behavioral design patterns

Behavioral design patterns explain how types interact with each other. These patterns describe how different instances of types send messages to each other to make things happen.

There are nine well-known patterns that are part of the structural design pattern type. They are as follows:

  • Chain of responsibility: This is used to process a variety of requests, each of which may be delegated to a different handler.
  • Command: This creates objects that can encapsulate actions or parameters so they can be invoked later or by a different component.
  • Iterator: This allows us to access the elements of an object sequentially without exposing the underlying structure.
  • Mediator: This is used to reduce coupling between types that communicate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required