Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Are DTO's still relevant?

 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Do we still feel the need for DTO's in our design or can we take a detached entity straight up to the managed bean?


What do you think?


Regards,
Rahul
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Both are legitimate. I think that later is more common with a clean design because the DTO would just be a copy of the entity.

DTO/value objects can still be useful when collecting data from different places.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!