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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python Design Patterns

You're reading from   Mastering Python Design Patterns A guide to creating smart, efficient, and reusable software

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781788837484
Length 248 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Sakis Kasampalis Sakis Kasampalis
Author Profile Icon Sakis Kasampalis
Sakis Kasampalis
Kamon Ayeva Kamon Ayeva
Author Profile Icon Kamon Ayeva
Kamon Ayeva
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. The Factory Pattern FREE CHAPTER 2. The Builder Pattern 3. Other Creational Patterns 4. The Adapter Pattern 5. The Decorator Pattern 6. The Bridge Pattern 7. The Facade Pattern 8. Other Structural Patterns 9. The Chain of Responsibility Pattern 10. The Command Pattern 11. The Observer Pattern 12. The State Pattern 13. Other Behavioral Patterns 14. The Observer Pattern in Reactive Programming 15. Microservices and Patterns for the Cloud 16. Other Books You May Enjoy

Use cases

The most usual reason to use the façade pattern is for providing a single, simple entry point to a complex system. By introducing façade, the client code can use a system by simply calling a single method/function. At the same time, the internal system does not lose any functionality, it just encapsulates it.

Not exposing the internal functionality of a system to the client code gives us an extra benefit: we can introduce changes to the system, but the client code remains unaware of and unaffected by the changes. No modifications are required to the client code.

Façade is also useful if you have more than one layer in your system. You can introduce one façade entry point per layer, and let all layers communicate with each other through their façades. That promotes loose coupling and keeps the layers as independent as possible.

...
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