Facade Design Pattern ??
Lets understand this in very layman language.
Suppose you are very lazy . You have to open lights of a room , television , ac , oven and etc.
What you can do is that you can
1)First get up switch on the light.
2)Then switch on the tv , look for the remote open it.
3)Go to your kitchen switch on your oven.
4)Search for ac remote and then you have to press the button.
That means you have to do the task in 4 steps. But as I said you are lazy , you don't like these many steps . So you go out in a market and purchase a 'MAGICAL REMOTE'.
Now , the purpose of this remote is that , once you press on button of this remote , your ac , tv , lights , oven etc. is switched on automatically.
You did not take above mentioned 4 steps . Just one click and your work is done.
This is basically how Facade pattern works.
Take example of goibibo or makemytrip.
You book a package and you just select a package and on the backend
1) your flight
2) hotels rooms
3) cabs
4) tourist spots
All are booked by clicking on the package. This is facade pattern.
References :
http://techytuts.in/facade-design-pattern-with-real-world-example-booking-system/
Keep Learning , Keep Growing and Keep Reading.
Thanks alot.
-Anurag Srivastava
http://techytuts.in/facade-design-pattern-with-real-world-example-booking-system/
Keep Learning , Keep Growing and Keep Reading.
Thanks alot.
-Anurag Srivastava

Thank you author ! Really nice content ! I like it. Shopfronts in London are generally installed for the designing of the facades of the business premises and shops.
ReplyDelete