Implementing the Façade design pattern
The Façade pattern is another structural GoF pattern, similar to the Adapter pattern. It creates a wall (a façade) between one or more subsystems. The big difference between the adapter and the façade is that instead of adapting an interface to another, the façade simplifies the use of a subsystem, typically by using multiple classes of that subsystem.
Note
The same idea can be applied to shielding one or more programs, but in this case, the façade is called a gateway—more on that in Chapter 16, Introduction to Microservices Architecture.
The Façade pattern is an extremely useful pattern that can be adapted to multiple situations.
Goal
The goal of the Façade pattern is to simplify the use of one or more subsystems by providing an interface that is easier to use than the subsystems themselves, shielding the consumers from that complexity.
Design
We could create...