aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Enthuware mock test - regarding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Enthuware mock test - regarding" Watch "Enthuware mock test - regarding" New topic
Author

Enthuware mock test - regarding

PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
This is from one of the Enthuware mock tests


Which of the following design patterns is normally used to reduce the number of remote calls made by the clients to the server?
Business Delegate
Model View Controller
Facade
Factory
Value Objects



The answer given is Value Object. Why not Facade - doesn't a Facade reduce the number of method calls ?
shiva viswanathan
Ranch Hand

Joined: Aug 12, 2004
Posts: 152
Hi Subramaniam

A session facade is a pattern whose main function is to shield the client
from teh complex business processing which might be remote or local

Thus it serves as another layer of abstraction .

For eg A session bean (EJB) is an example of session facade

It explicitly does not reduce traffic because the client still makes
only one remote call , to the session facade but the complexity is
reduced since the session facade exposes the simple interface to the business processing to the external client .

So it simplifies things for client not necessarily reducing the traffic

However coupled with VOs they can result in reduction of traffic.
FOr eg a session beans method's input paramters can be VOs

Catch You Later
Shiva
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
Hi Shiva,

Agreed with what you have said about Facade. When you consider a work flow like system(a facade calling mulitple EJB's) would not the Session Facade be reducing the number of network calls i.e network traffic ? If a session facade is not available won't the client have to make multiple method calls to the EJB tier to accomplish the same task ?

I've come across in Wrox J2EE programming(Volume II) that reducing the network traffic/number of calls is one of the advantages of Facade pattern.
shiva viswanathan
Ranch Hand

Joined: Aug 12, 2004
Posts: 152
Yes , thats partially true .

But the main reason for using session facade to provide network
transparency .

If we are required to choose between VO and facade then
defintely Vo more fits the role of resucing network traffic

And i guess the qs says "normally"
and when designing a session facade reducing network traffic is not the main goal

Its just one of those ambiguous qs where we have to go for the best answer
i guess .
Thankfully number correct ans will be speciifed in the exam

Catch You Later
Shiva
David Bridgewater
author
Ranch Hand

Joined: Apr 29, 2004
Posts: 44
This is not a great answer to your question... but as Facade is not on the syllabus, it ought not to be a correct answer to a "fair" question for the SCWCD. This is regardless of what the qualities of the Facade pattern might be.
PNS Subramanian
Ranch Hand

Joined: Jul 13, 2004
Posts: 150
A similar one


_________ pattern provides a layer between clients and subsystems of a complex system; shields clients from subsystem components, making the subsystems easier to use
Singleton
Facade
Business Delegate
Template Method


Can anyone take a shot at this one ? Would the exam have such questions ?

My answer was Business Delegate while the answer given is Facade !!!
http://java.about.com/gi/dynamic/offsite.htm?zi=1/XJ&sdn=java&zu=http%3A%2F%2Fwww.podar.net%2Fscwcd%2Fstartexam.htm
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enthuware mock test - regarding
 
Similar Threads
Clarification using Session Facade
design patterns
SCJP Preparation
coarse grained & fine grained
Local and remote interfaces for session facade?