• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

mock exam question related to design pattern

 
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Transfer object reduces network traffic but doesn't knows how to get hold of all of the services that an application might need.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ya i think answer is Transfer Object.Definitely not Service Locator
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer d is correct both patterns reduce network traffic but the pattern descrived is Service Locator

Javier Snaider

SCWCD 5
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
pradeep singh
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankx to you all specially Marc Peabody to clearify me.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic