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:55:01 UTC

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

Isn't what you wrote just a restatement of what I wrote? Perhaps my
statements just weren't clear.

Ralph

-----Original Message-----
From: Ugo Cei [mailto:u.cei@cbim.it] 
Sent: Thursday, May 06, 2004 9:40 AM
To: users@cocoon.apache.org
Subject: Re: Business Objects vs Data Objects [was Re: JXTemplates - what' s
in a name?]

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


---------------------------------------------------------------------
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 Danny Bols <db...@osirion.be>.
Could in your example valueObject be a BO (Business Object) or is
valueObject a DTO which is used to populate a BO?

When using the Flow/CForm solution who is used (BO or DTO) to bind data to
the form?

--
Danny

> -----Original Message-----
> From: Ugo Cei [mailto:u.cei@cbim.it]
> Sent: donderdag 6 mei 2004 19:24
> To: users@cocoon.apache.org
> Subject: Re: Business Objects vs Data Objects [was Re: JXTemplates -
> what' s in a name?]
>
>
> Ralph Goers wrote:
> > Isn't what you wrote just a restatement of what I wrote? Perhaps my
> > statements just weren't clear.
>
> I don't think so. You said:
>
> "In my environment a DAO is the object that is the result of reading
> from the database (or some other source)."
>
> To me this means (more or less) that you read from the db and as a
> result you get an object whose fields contain values from the database
> columns.
>
> If this is what you mean, it isn't a DAO. This is a DAO:
>
> Dao myDao = daoFactory.getDao();
> SomeClass valueObject = myDao.find(pk);
>
> "valueObject" is the result of reading. "myDao" is what you use
> to read it.
> Sorry to be nitpicking, but since this thread revolves around
> nomenclature, we'd better agree on what each term means exactly.
>
> 	Ugo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
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:
> Isn't what you wrote just a restatement of what I wrote? Perhaps my
> statements just weren't clear.

I don't think so. You said:

"In my environment a DAO is the object that is the result of reading 
from the database (or some other source)."

To me this means (more or less) that you read from the db and as a 
result you get an object whose fields contain values from the database 
columns.

If this is what you mean, it isn't a DAO. This is a DAO:

Dao myDao = daoFactory.getDao();
SomeClass valueObject = myDao.find(pk);

"valueObject" is the result of reading. "myDao" is what you use to read it.

Sorry to be nitpicking, but since this thread revolves around 
nomenclature, we'd better agree on what each term means exactly.

	Ugo


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