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

Creating DTO

 
Akar Rafidj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends

For the assignment, we have to build many DTO (or VO..), usually DAO and controllers create these objects, code is duplicated. DTO may be simple or composite.What about an independent composent based on the GOF Builder pattern to centralize DTO creation ?

Thanks for any comment.

Akar
 
Jeremy Hsu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think it is easier to use a Factory pattern instead of a builder for those case.
[ September 09, 2005: Message edited by: Jeremy Hsu ]
 
Akar Rafidj
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeremy

I agree than Factory pattern is easer when you have a limited set of types, but when composition complexity change frequently, using Builder, Composite, Factory together is useful.
One remark, this assignment offers opportunities to use many GOF patterns: Composite, Factory, Facade, Adapter, Flyweight, Proxy, Command...

Thanks Jeremy

Akar
[ September 10, 2005: Message edited by: Akar Rafidj ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic