Tim Rowe wrote: "The use of 'VO's in Flex has always confused me,
largely because as everyone I've spoken to has explained it, all a
'Value' object is is just a Model object - therefore WTF are they being
referred to as 'VO's when 'Object' (or Model object) would suffice."

 

Tim, I have always thought of a model and a VO or DTO differently.  I
think this is a good quick explanation: 
http://en.wikipedia.org/wiki/Data_Transfer_Object 

 

>From an MVC perspective, I think a model class contains information
sure, but it can and often does contain methods to run logic on data, to
retrieve data, to broadcast that data is ready or changed, etc. 

 

A Value Object (VO) or Data Transfer Object (DTO) - (two terms for the
same thing, I usually call them VOs because you don't always "transfer"
them per se) are simple classes that only contain properties that can be
get and/or set.  They do not contain methods, constructors, or any other
form of logic.  They are "dumb" in a sense, only serving as information
repositories.  There is good logic in this I think.  I use them all the
time.  And I don't think they are only for "moving" data around in, they
are useful in single session storing of information.  So often a model
contains references to (say in as a property which could be the VO
directly or several in an Array or ArrayCollection) and also may change
data within VOs, as well as broadcast when something changes.

 

That's my perspective anyway.  

 

 

Jason Merrill 



Bank of  America    Global Learning 

Shared Services Solutions Development 


Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
<http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx>  

<<attachment: image001.jpg>>

Reply via email to