Book Image

Mastering Python Design Patterns

By : Sakis Kasampalis
Book Image

Mastering Python Design Patterns

By: Sakis Kasampalis

Overview of this book

Table of Contents (23 chapters)
Mastering Python Design Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
The Factory Pattern
Index

A real-life example


The Facade pattern is quite common in reality. When you call a bank or company, you are usually first connected to the customer service department. The customer service employee acts as a Facade between you and the actual department (billing, technical support, general assistance, and so on) and the employee that will help you with your specific problem. The following figure, provided by sourcemaking.com, shows this example graphically [j.mp/facadepat]:

A key used to turn on a car or motorcycle can also be considered a Facade. It is a simple way of activating a system that is very complex internally. And of course, the same is true for other complex electronic devices that we can activate with a single button, such as computers.