Link to home
Start Free TrialLog in
Avatar of KaranGupta
KaranGupta

asked on

Facade design pattern

Hi

Is custom control an example of facade design pattern because if the developer is using the control then he is using the front end of the complex control.


Kindly advice

Regards
Karan Gupta
Avatar of kaufmed
kaufmed
Flag of United States of America image

Perhaps slightly, but I would tend to say no. The Facade pattern is about turning complex functionality into simple functionality. An example from a book I am reading describes an entertainment system. The complex system allows you to watch a movie, but you have to turn on each component:

turn_on_projector
turn_on_surround_sound
turn_on_dvd_player
start_popcorn_machine

With the Facade, you turn all of these steps into a more simple series of steps:

start_movie

...behind the scenes, the Facade is doing all the things you would have previously done yourself (above).
Avatar of KaranGupta
KaranGupta

ASKER

Hi Kaufmed

Thanks for the reply. Can you please give me some real time example related to programming?

Regards
Karan Gupta
You can find a pretty decent example here:

http://www.dofactory.com/Patterns/PatternFacade.aspx#_self2
Hi Kaufmed

Thanks for the reply. I got the answer. But one more thing if I create a system that will calculate tax is also an example of facade design pattern.

Please advice

Regards
Karan Gupta
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be closed as follows:

Accepted answer: 0 points for KaranGupta's comment #a38344168

for the following reason:

Got the explanation
Which is... your own comment? Care to elaborate?
Hi Kaufmed

I selected your post as answer, but I don't know how it went to the close question work flow. I am accepting it again :)
Got the answer
No problem. I was just a bit confused for the moment  = )