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

Summary


This chapter concludes the discovery of the seven structural patterns. The adapter pattern has much more in common with the bridge pattern. The main difference is in the purpose of the pattern.

A bridge separates an interface and its implementation, whereas an adapter changes the interface of an existing object.

The decorator adds a functionality to an object without changing its interface and should be transparent to the application. For the adapter, this is not the case, it is not transparent from the client perspective: the adapter is the named implementation of the interface that a client sees, so the adapter is not hidden from the client.

The proxy pattern doesn't change any interface. It defines substitute objects for other objects.

The facade pattern transforms high-level requests into low-level requests by communicating with other subsystems. It hides the complexity of these subsystems by providing a simple interface that the client can see.

In the next chapter, we will start...