Summary
We’ve reached the end of our short-and-sweet dive into the Façade pattern, but let’s review a few key points before wrapping up. First, the Façade pattern is best when you need a simple interface for a subsystem or set of subsystems that work together on complex operations. This structure creates an easy access point for your client to make complicated requests without knowing how the work is done and decouples any dependencies between your client and those subsystems.
Because the Façade pattern structure is relatively uncomplicated, you only need to be aware of the Façade
class and your subsystems.
The Façade
class stores object instances of each subsystem and delegates any client requests straight to the subsystem in question, often calling multiple subsystem operations in sequence to stack pieces of functionality into complex features (like we did with our auto-save feature). Keep in mind that you can make your Façade...