A UML class diagram
We will now discuss the Façade pattern with the help of the following UML diagram:
As we observe the UML diagram, you'll realize that there are three main participants in this pattern:
- Façade: The main responsibility of a façade is to wrap up a complex group of subsystems so that it can provide a pleasing look to the outside world.
- System: This represents a set of varied subsystems that make the whole system compound and difficult to view or work with.
- Client: The client interacts with the Façade so that it can easily communicate with the subsystem and get the work completed. It doesn't have to bother about the complex nature of the system.
You will now learn a little more about the three main participants from the data structure's perspective.
Façade
The following points will give us a better idea of Façade:
- It is an interface that knows which subsystems are responsible for a request
- It delegates the client's requests to the...