Dumb data buckets.

They are known as Value Objects, Data Objects, and now Sun calls them Transfer Objects. You only need these if you are doing EJB right? Is there any reason to have your DAO interfaces return Transfer Objects rather than full-fledged "Business Objects" or "Domain Objects" or whatever you call them. I think the answer is NO.

I'm sure this will upset any remaining EJB fans out there: even if you are doing EJB, you can hide the EJB/Transfer object mess behind a set of DAO interfaces.



Like this post?  del.icio.us Bookmark it   |   submit to dig digg.com Digg it   |   slashdot Slashdot it   |   technorati See who links to it

Comments:

Data Transfer Objects are a necessity for distributed interfaces and they are not particularly unique to EJB. <P> DTO's should ONLY be used for remote interfaces - they shouldnt be used in local interfaces.<br> Certainly, your DAO,s shouldnt be creating DTO's - creating DTO's is the job of Remote facade... <p> -Nick

Posted by Nick Minutello on January 10, 2003 at 08:25 PM EST #

Post a Comment:
  • HTML Syntax: Allowed

This work is licensed under a Creative Commons License.
Copyright 2002-2007, David M Johnson (dave.johnson at rollerweblogger.org)

This is a personal weblog, I do not speak for my employer.