Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift 2 Design Patterns

You're reading from   Swift 2 Design Patterns Build robust and scalable iOS and Mac OS X game applications

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785887611
Length 224 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Julien Lange Julien Lange
Author Profile Icon Julien Lange
Julien Lange
Arrow right icon
View More author details
Toc

The facade pattern

The facade pattern is a simple pattern used to group the interfaces of a group of objects and a unified interface that is easier to use by a client.

Roles

The facade pattern allows you to provide the operations that might be desirable by a user. The pattern encapsulates the interface of each object that is considered as a low-level interface. To construct the unified interface, we might need to implement some methods that will compose the low-level interfaces:

  • It must be used to provide a simple interface of a complex system. The architecture of the system can be composed of several small classes that allow great modularity, but clients don't need such properties. They only need something simple that meets to their needs.
  • It can be used to divide the system into subsystems. The façade will be an interface that allows the communication between subsystems.
  • It can be also used to encapsulate the implementation of a system toward an external consumer.

Design

The facade...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image