Facade Design Pattern
Facade Design Pattern
means the face of the building
Provide a unified interface to a set of interfaces in a
subsystem.
Façade defines higher level interface that makes subsystem
easier to use.
It is a simplified interface that performs many other actions
behind the scenes.
Example
You want to add rupees 5000 into your paytm
wallet?
Check you are authorized user?
Check you have enough money in your
account?
Check OTP is correct or not?
If All OK ,Finally transaction takes place.
Example
Glass face of the building.
Problem
client community needs a simplified interface to the overall
functionality of a complex subsystem.
Applicability
When we want a simplified interface that performs many other
actions behind the scenes.
Structure
Consequences
• The Facade simplifies the use of the required subsystem. However,
because the Facade is not complete, certain functionality may be
unavailable to the client.
• It shields clients from subsystem components, thereby reducing the
number of objects that clients deal with and making the subsystem
easier to use.