Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about 'Pattern Design'

 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the benefits of using Transfer object pattern?
Select 2 correct options

a The type of the actual data source can be specified at deployment time.

b The data clients are independent of the data source vendor API.

c It increases the performace of data accessing routines.

d It allows the clients to access the data source through EJBs

e It allows resource locking in an efficient way.

The answer is a , b

Is it correct?

Thanks
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None of the above.

Where did you get this question?
 
Janesh Vajapeyi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this nice summary of Transfer object pattern:

http://www.corej2eepatterns.com/Patterns2ndEd/TransferObject.htm

 
Tanveer Ahmad
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a The type of the actual data source can be specified at deployment time.
-- TO have nothing to do with DD, they are like packet of data readu to be sent and recieved like curriers.
b The data clients are independent of the data source vendor API.
-- This has nothing to do with TO.
c It increases the performace of data accessing routines.
-- If at all there is any answer to this question then this could be the one. TOs do improve the performance by reducing the network call to access the data. You have that data packet, you recieved through currier.
d It allows the clients to access the data source through EJBs
-- EJBs are not required to have TO for that. Moreover the word "data source" is confusing. Had there been "data" instead of "data source" then this could have been a right options. In fact TO are best used in a situation where you have EJB container running on some different server (then the web server). This way you can currier the TO from EJB container to WEB server.
e It allows resource locking in an efficient way.
-- TOs do not lock the data, that is their demerit... it can have stale data.

Hope this helps.
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Tanveer .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic