2

I am confused about using the facade and delegate design patterns. Though there are links to explain about the design patterns., I found none to say about the scenarios where should we use these patterns appropriately.

Can anyone say some scenarios which will differentiate the usage of facade and delegate design pattern in java?

Arun
  • 825
  • 4
  • 14
  • 31
  • check this discussion http://www.coderanch.com/t/100145/patterns/Difference-facade-business-delegate-pattern – Rais Alam Feb 26 '13 at 05:24

1 Answers1

0

I don't think there is much difference between them. Delegate is a special case of Facade.

Facade can be used to convert one API call to another API call. Like in wrapping a library and exposing only API you want. Delegate can be used to expose API of an existing class without inheriting from it.

denis.solonenko
  • 11,645
  • 2
  • 28
  • 23
  • Thanks for your answer. But It seems like defining the terms. Can you please provide any real time example which could stand between facade and delegate. – Arun Feb 27 '13 at 09:02