You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shasirekha Engala <sh...@patni.com> on 2006/02/23 11:30:26 UTC
BusinessObject and DataTransferObject
Hi
What is the difference between a BusinessObject and DataTransferObject.
Can the DTO be serialized.
Thanks and Regards
Shasi
Re: BusinessObject and DataTransferObject
Posted by Simon Chappell <si...@gmail.com>.
On 2/23/06, Leon Rosenberg <ro...@googlemail.com> wrote:
> On 2/23/06, Simon Chappell <si...@gmail.com> wrote:
> > I'm sure someone can give you a much more Comp.Sci. answer, but here's
> > my "in the trenches" answer.
> >
> > A business object is any object that you use to represent a business
> > concept. Classic examples would be customer, address and order.
> >
> > A data transfer object is anything that you use to send data from
> > either one part of program to another part or one program to another.
> > The Struts Form objects are classic data transfer objects. Service
> > requests are also usually data transfer objects.
>
> True, but more typical a DTO is used to decouple layers or application
> parts. Using DTOs in interfaces make them stablier, more immune to
> changes in the implementation or client.
You are right and while I didn't use the word "layers", the "one part
of the program to another part" includes both layers and subsystems to
my way of thinking. I tend to make huge use of request and reply
objects (DTOs) in my system's APIs as it does wonders to clean up the
potential dependency mess.
I think we said the same thing using different words. :-)
> Regards
> Leon
Simon
--
www.simonpeter.org
uab.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: BusinessObject and DataTransferObject
Posted by Leon Rosenberg <ro...@googlemail.com>.
On 2/23/06, Simon Chappell <si...@gmail.com> wrote:
> I'm sure someone can give you a much more Comp.Sci. answer, but here's
> my "in the trenches" answer.
>
> A business object is any object that you use to represent a business
> concept. Classic examples would be customer, address and order.
>
> A data transfer object is anything that you use to send data from
> either one part of program to another part or one program to another.
> The Struts Form objects are classic data transfer objects. Service
> requests are also usually data transfer objects.
True, but more typical a DTO is used to decouple layers or application
parts. Using DTOs in interfaces make them stablier, more immune to
changes in the implementation or client.
Regards
Leon
>
> Note: Data transfer objects can sometimes carry business objects, but
> I've never seen a data transfer object inside a business object.
>
> Hope this helps.
>
> Simon
>
>
> On 2/23/06, Shasirekha Engala <sh...@patni.com> wrote:
> > Hi
> >
> > What is the difference between a BusinessObject and DataTransferObject.
> > Can the DTO be serialized.
> >
> >
> > Thanks and Regards
> > Shasi
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> www.simonpeter.org
> uab.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: BusinessObject and DataTransferObject
Posted by Simon Chappell <si...@gmail.com>.
I'm sure someone can give you a much more Comp.Sci. answer, but here's
my "in the trenches" answer.
A business object is any object that you use to represent a business
concept. Classic examples would be customer, address and order.
A data transfer object is anything that you use to send data from
either one part of program to another part or one program to another.
The Struts Form objects are classic data transfer objects. Service
requests are also usually data transfer objects.
Note: Data transfer objects can sometimes carry business objects, but
I've never seen a data transfer object inside a business object.
Hope this helps.
Simon
On 2/23/06, Shasirekha Engala <sh...@patni.com> wrote:
> Hi
>
> What is the difference between a BusinessObject and DataTransferObject.
> Can the DTO be serialized.
>
>
> Thanks and Regards
> Shasi
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
www.simonpeter.org
uab.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org