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
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.
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.
Joined: Oct 23, 2007
Thankx to you all specially Marc Peabody to clearify me.
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 ]
subject: mock exam question related to design pattern