« DAO comments. | Main | Happy Thanksgiving! »

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.

Comments:

Data Transfer Objects are a necessity for distributed interfaces and they are not particularly unique to EJB.

DTO's should ONLY be used for remote interfaces - they shouldnt be used in local interfaces.
Certainly, your DAO,s shouldnt be creating DTO's - creating DTO's is the job of Remote facade...

-Nick

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

Post a Comment:
  • HTML Syntax: NOT allowed

« DAO comments. | Main | Happy Thanksgiving! »

Welcome

This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog

Related entries

Below are the most recent entries in the category Java, some may be related to this entry.