On Mon, 2004-04-19 at 20:15, Harkness, David wrote:
> beginner wrote:
> > when i generate classes for a CMP (MyClassBean, for
> > instance), xdoclet already creates a MyClassData wich
> > basically packs all attributes for that class.
> > So, i don't get exactly the use of a Domain Value
> > Object (MyClassVO) in this case, as the MyClassData
> > already encapsulates all i need.
> > Could anyone share some comment on that?
> 
> >From what I remember from discussions almost a year ago, the Data
> Object subtask was created first, and the Entity Fa�ade subtask
> created to use those objects. Then DO was replaced by Value Objects
> (it wasn't mentioned why, or I simply don't recall). 

Because they're more flexible.  Quite why it was done that way, rather
than changing the DOs, I'm not sure.  Probably because they were so
different and we didn't want to break stuff that used the existing DOs. 
Seeing as we've been saying DOs are deprecated for years now, we
probably ought to get round to removing them some time.  The main
obstacle to that is the facade stuff, though, which still uses DOs :-(

> I do believe that DOs do not handle relationships at all while Value
> Objects can compose or aggregate their related beans into VOs.

Not only that, you can have multiple VOs per bean and a VO doesn't need
to contain all of a bean's fields.  So you can create a 'heavy' VO (with
all fields, plus nested objects containing all the fields of any CMR
beans it composes), and a 'light' version (that only has a subset of the
fields, for when you don't to take the performance hit of retrieving all
that extra data).


Andrew.

> 
> David Harkness
> Sr. Software Engineer
> Sony Pictures Digital Networks
> (310) 482-4756



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to