• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Transfer Object Factory

 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I don't understand the need for a Data Transfer Object Factory (as explained in 'EJB Design Patterns: Advanced Patterns, Processes, and Idioms by Floyd Marinescu')
Why would you need a DTO Factory ?

Thanks
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still don't know
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just scanned the chapter, but I understand what he's saying...
His contention is that the DTO object is less closely related to the business layer (e.g. EJB) than it is to the application layer (e.g. Presentation). As a result, he supports having a Factory Object that is the "one stop shopping" for DTO's. This enables the bean builder to make all the changes he/she wants with less impact on the client applications. It's another layer of insulation. It's like a lens. It's the same light, but a lens can bend the light or filter it. Same thing with this factory. The factory can support more flavors of the DTO and can aggregate data from multiple beans if that's what the application layer needs. It's all about separation of interface from implementation.
Hope I didn't confuse you more.
Byron Estes
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks you didn't confuse me at all
so basically it comes down to the fact you don't have control over the 'version' of the DTO's at the client side so you force him to get DTO's from a factory so the EJB developer has control over it
Neat
 
Byron Estes
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the essence of it.
Have a great weekend!
Byron Estes
(SCEA in training )
 
Dave Van Even
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hehe you too !!
(in training too )
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!