• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

differnce between facade and proxy

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i feel there is not much difference between a facade and proxy pattern, and they can be exchanged for each other in some cases ., can someone provide light on the diffence in these patterns and when is facade more appropriate to using proxy.
For eg, in my FBN system, the controller talks to another object( facade or proxy or mediator ???) which talks to the data classes ??? what is this class between the controller & data classes , proxy or facade ???
THanks
Rachna
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A proxy can filter out bad requests, where as a facade doesn't filter anything, it justs acts as a way to make a complex subsystem easier to access for a client.
A proxy is a "Stand-in" it pretends to be the subsystem, taking requests and deciding if it is ok to really send it to the subsystem.
So while they are very much like "Fronts" for an underlying system, there really is two seperate purposes.
I always look at proxies, and think web server proxies to protect web servers for bad people.
Mark
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Proxies are a stand-in, Facades hide complexity.
Other uses for proxies are accessing remote resources like we are doing and deferring creation of expensive resources until they are actually needed.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A proxy delegates to an instance of the same type as the proxy. A facade not.
 
reply
    Bookmark Topic Watch Topic
  • New Topic