O'Reilly logo

Learning Python Design Patterns by Gennadiy Zlobin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. The Facade Design Pattern

Sometimes a subsystem of classes and objects becomes so complex that it's hard to understand how it works. It becomes even more difficult to understand how to use this system and how to decrease the complexity. A Facade design pattern is designed to solve this problem.

In this chapter we will cover:

  • The Facade design pattern
  • Implementation of the Facade design pattern in Python source code
  • Building a weather forecast service in Python

The Facade design pattern

The Facade design pattern provides a unified interface instead of a set of interfaces of some complex subsystem. Facade creates a higher-level interface that simplifies subsystem usage. This design pattern aggregates classes that implement the functionality ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required