Facade Design Pattern

Facade Design Pattern is the Structural design patterns (like Adapter pattern and Decorator pattern). Facade design pattern is used to easily interact with the complex system.

According to Design Patterns: Elements of Reusable Object-Oriented Software (Gang of Four) Facade design pattern is:

Provide a unified interface to a set of interfaces in a subsystem. Facade Pattern defines a higher-level interface that makes the subsystem easier to use.

Let’s understand with a simple example,

We have a holiday package booking application. We have 3 type of holiday packages available (Dimond, Gold & Silver)

A user can select the preferred destination and package, and based on the selected package and destination our application will start the booking process.

Booking Process includes:

  • Book return trip flight.
  • Book hotel
  • Book cabs for the complete holiday
  • Book a guide

In our example, we will implement first three booking facility.

There are 2 ways to implement this problem statement.

  1. let our client application trigger each booking one by one.

Problem with this approach

when we add or remove new service then we also have to make the change in the client application.

The client application needs to have all the details of our complex system.


   Adding new service need to change client application.

    1. What if we add an interface (*it is not a java interface) between client and services and let that interface execute the needed service. In this way, our client only has to interact with that interface and all other complex things are taken. We call this interface A FAÇADE Interface or FAÇADE Class.


Our FAÇADE class will take care of all the complexity so that our client application doesn’t have to worry about. He just has to trigger booking method in FAÇADE class.

Code Example:










The Facade design pattern simplifies the interface to a complex system; because it is usually composed of all the classes which make up the subsystems of the complex system.