Chapter    16

The Façade Pattern

The façade pattern is used to simplify the API presented by one or more classes so that common tasks can be performed more easily and the complexity required to use the API is consolidated in one part of the application. Table 16-1 puts the façade pattern into context.

Table 16-1. Putting the Façade Pattern into Context



What is it?

The façade pattern simplifies the use of complex APIs to perform common tasks.

What are the benefits?

The complexity required to use an API is consolidated into a single class, which minimizes the impact of changes in the API and simplifies the components that consume the API functionality.

When should you use this pattern?

Use the façade pattern when you are working with ...

Get Pro Design Patterns in Swift now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.