Book Image

Swift 2 Design Patterns

By : Julien Lange
Book Image

Swift 2 Design Patterns

By: Julien Lange

Overview of this book

Table of Contents (15 chapters)
Swift 2 Design Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Behavioral Patterns – Chain of Responsibility and Command

In this chapter, we will continue to explore the behavioral patterns—the chain of responsibility and command patterns. Both of these patterns are concerned with passing requests to appropriate objects that will then execute the action.

The main difference between these two patterns is the way that the requests are passed between objects.

In this chapter, we will discuss the following topics:

  • The chain of responsibility pattern

  • The command pattern