From the course: Practical Design Patterns in Swift

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Purpose: Simplify usage

Purpose: Simplify usage - Swift Tutorial

From the course: Practical Design Patterns in Swift

Start my 1-month free trial

Purpose: Simplify usage

- [Instructor] Let's talk about the pattern that's all about simplification, the Facade. As a software developer, you might've encountered overly complicated APIs, classes with cumbersome interfaces, and methods you've never used. Using such components make our lives unnecessarily hard. The Facade pattern hides the complexity and lets us work with a more convenient interface. The Facade exposes a simpler set of public methods and properties. Clients communicate with the Facade, which in turn forwards the requests to the component it simplifies. The Facade not only simplifies the usage of complex interfaces, but it also decouples the consumer's site from these complicated frameworks. You may want to use the Facade when you only need a subset of the functionality provided by a type or framework. It proves to be useful also when working with components that tend to change frequently, like, for example, beta SDKs. Changes in these frameworks can be adopted in the Facade without…

Contents