• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Enthuware mock test - regarding

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic