wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mock exam question related to design pattern 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 "mock exam question related to design pattern" Watch "mock exam question related to design pattern" New topic
Author

mock exam question related to design pattern

pradeep singh
Ranch Hand

Joined: Oct 23, 2007
Posts: 339
69
Marks: 1
Which design pattern does the following description most closely match?
"This pattern is designed to have an object that knows how to get hold of all of the services that an application might need. It is designed to minimise network traffic and improve communication effeciency. It is often used in conjunction with the Business Delegate pattern"

Choose one answer.

a. Model View Controller


b. Transfer Object


c. Business Delegate


d. Service Locator


e. Facade


Answer is given d.But i think it should be b because it is mentioned in Peabody's notes that Transfer Object reduces Network traffic.
Please Correct me if i am wrong.


Source: Marcus 2 exam


SCJP 5.0(75%), SCWCD 5.0(88%)
Musab Al-Rawi
Ranch Hand

Joined: Aug 06, 2007
Posts: 231
Transfer object reduces network traffic but doesn't knows how to get hold of all of the services that an application might need.


SCBCD - SCWCD - SCJD - SCJP - OCA
Salil Dhawan
Greenhorn

Joined: Sep 18, 2006
Posts: 16
Ya i think answer is Transfer Object.Definitely not Service Locator
Javier Snaider
Greenhorn

Joined: Apr 22, 2008
Posts: 12
The answer d is correct both patterns reduce network traffic but the pattern descrived is Service Locator

Javier Snaider

SCWCD 5
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

The question's clues are:
1) It gets service objects
2) Reduces network traffic (by caching service objects, by the way)
3) Paired with Business Delegate

Clues 1 and 3 are dead giveaways for Service Locator. Clue 2 is most likely to describe a Transfer Object, but clues 1 and 3 don't make sense for Transfer Object at all.

I really recommend using my notes as a supplement to your patterns studies. My notes don't really explain the patterns in detail - you should learn that from a book or from the core patterns website (link can be found in my notes).


A good workman is known by his tools.
pradeep singh
Ranch Hand

Joined: Oct 23, 2007
Posts: 339
Thankx to you all specially Marc Peabody to clearify me.
Olivier Ledru
Greenhorn

Joined: Jun 03, 2008
Posts: 6
Both reduce Network traffic, but not the same way.
Transfert Object reduce it by sending a bundle of data in one remote call, instead of having several small remote call.
Service Locator reduce it by "caching" high-cost resource (like JNDI resource).

The answer is definitely Service Locator to me.
[ June 06, 2008: Message edited by: Olivier Ledru ]

Olivier,<br />SCJP5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mock exam question related to design pattern