File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Java Facades, what's the point in them? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Facades, what Watch "Java Facades, what New topic
Author

Java Facades, what's the point in them?

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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.
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
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


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Facades, what's the point in them?
 
Similar Threads
Aggregate/Composite Entity or Session Facade (Part II)
Command pattern Vs Session Facade.
J2EE application to J2EE application calls..
What is distributed Computing from an Application's Point of View
choosing between home business methods and finders