This is the continuing post in a series of post on Design patterns.
Presently we are going through the structural patterns. I will be
writing about the Façade pattern today. This would be the last
You can read about the other patterns from the following links
Façade pattern deals with encapsulating a subsystem which means
providing a different high level view of subsystem whose details are
hidden from users.
As you can see from the above example, the Bonus class is a subsystem
which is encapsulated in the façade. When we call the Bonusfacade’s
GetBonus method, it internally creates an object of the subsystem and
does the necessary functionality. We have to use the façade pattern when
the system might get more complex but the present users shouldn’t be
aware of the change or when the abstraction and implementation of a
system are tightly coupled.
This is the last of the structural patterns. In my next post I will
start with the Creational patterns.