Summary
In this chapter, we have learned how to use the façade pattern. This pattern is ideal for providing a simple interface to client code that wants to use a complex system but does not need to be aware of the system's complexity. We discussed a Django third-party module that uses façade: django-oscar-datacash
. It uses the façade pattern to provide a simple DataCash API and the ability to save transactions.
We also learned how to implement the interface used by a multiserver OS. Overall, we learned that a façade is an elegant way of hiding the complexity of a system because, in most cases, the client code should not be aware of such details.
In the next chapter, we will cover other structural design patterns.