• 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

Java Facades, what's the point in them?

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just wondering if you guys couldd clear this question up for me?

Been looking round and it seems they're meant to be the way to go if you have a system that makes a number of calls to Beans causing network lag.

Point 1:
How do they improve system performance?

Point 2:
What do they actually do? I've had a look around and can;t really find any decent examples (all theexamples I've found don't work). Froim what I can see all that's different between Facades and standard Interfaces is that a Facade calls Methods from several different Beans rather than 'one Interface to one Class'...

Is this right? I'm guessing it reduces network lag, bacause you only have one Interface call rather than several.
 
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Facades can improve performance by making coarse grained calls. For example a client can make one coarse grained inter process communication (i.e. from one JVM to another e.g Web Service call etc) whereas the facade will make a number of fine-grained calls to the local components (i.e. within the same JVM). This minimises the number of network calls.


Secondly a facade minimises the complexity in interactions between the caller and the callee. Look at the Java facade design pattern
 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't suppose you have a simple example (I work better with examples), I've scanned the Internet for a day now and believe it or not I can not find a single decent WORKING example. The only two examples i found were riddled with erros tht made no sense (one even seemed to ever actually call the Interface!!! Quality)
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic