You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ralph Goers <Ra...@digitalinsight.com> on 2004/05/06 18:18:37 UTC

RE: Business Objects vs Data Objects [was Re: JXTemplates - what' s in a name?]

In my environment a DAO is the object that is the result of reading from the
database (or some other source). This doesn't necessarily have any
relationship to the business objects - they can contain information from one
or many DAOs. Finally DataTransferObjects are the objects sent to the
presentation tier as the result of a request.

Ralph

-----Original Message-----
From: Derek Hohls [mailto:DHohls@csir.co.za] 
Sent: Thursday, May 06, 2004 12:45 AM
To: users@cocoon.apache.org
Subject: Business Objects vs Data Objects [was Re: JXTemplates - what's in a
name?]

Bertand

Is there not a difference between a Java "business
object" (which I assume in a Cocoon app will be a 
POJO - even though I do not now know where and
how to create this...) and "data access object" - at
least that what the Core J2EE patterns imply
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.ht
ml 

Is this distinction worth making?

Thanks
Derek



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Business Objects vs Data Objects [was Re: JXTemplates - what' s in a name?]

Posted by Ugo Cei <u....@cbim.it>.
Ralph Goers wrote:
> In my environment a DAO is the object that is the result of reading from the
> database (or some other source).

You can call them anything you like, but the accepted meaning of DAO is 
an object that is used to read/store Value Objects from/to a persistent 
storage. A DAO has no attributes with business meaning. See [1].

 > Finally DataTransferObjects are the objects sent to the
 > presentation tier as the result of a request.

DTOs are used to transfer data in a single chunk between layers of a 
*distributed* application. That is, if you have a remote object (imagine 
an entity EJB) with many attributes, you'd rather copy the attribute 
values to a DTO and serialize it to the client rather than call many 
getters across the wire. [2]

If your presentation layer is remote, you can as well send DTOs to it.

	Ugo

[1]: 
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
[2]: 
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org