October 29, 2020
design-pattern

Facade Pattern

In Facade pattern, a single class represents an entire complex system. It provides a simplified interface to a library, a framework, or any other complex set of classes.

For example consider a restaurant.  When the customer go to a restaurant and order some food, then the operator give the voice interface on behalf of the restaurant. This is the façade for the customer. The customer don’t need to know, how the food will be made, what temperature it will be burn, what materials will be used etc.

When to use facade pattern
You can use facade pattern in order to simplify the problem when there are multiple complex subsystems and interacting with them individually is really difficult.

Real life example

  • A shopkeeper is a facade for all the items in the shop.
  • A travel site is a facade for customers for different holiday or travel packages.
  • The customer care is a facade for customers for different services.

Rashedul Alam

I am a software engineer/architect, technology enthusiast, technology coach, blogger, travel photographer. I like to share my knowledge and technical stuff with others.

View all posts by Rashedul Alam →

One thought on “Facade Pattern

Leave a Reply

Your email address will not be published. Required fields are marked *