O'Reilly logo

Swift 2 Design Patterns by Julien Lange

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

Chapter 5. Behavioral Patterns – Strategy, State, and Template Method

I hope you're still with us; now, we will introduce you to the third and last category of the design patterns, which is categorized as a Gang of Four (GoF) design patterns: the behavioral pattern. Behavioral patterns are dedicated to algorithms and communication between them.

As algorithms consist of several operations that are divided into different classes, behavioral patterns can handle the organization of such classes and the ways in which they can communicate with one another.

The behavioral category contains 11 patterns that we will discuss through four chapters. In this chapter, we will discuss the following three patterns:

  • The strategy pattern
  • The state pattern
  • The template ...

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