Hi Mark

In the fairly large applications I've worked on, I've not had occasion to
use Proxy, if you mean this:

http://livedocs.adobe.com/flex/3/langref/flash/utils/Proxy.html

Basically it lets you create an object that poses as something else,
possibly supplementing it. For example, in the example given, they create a
ProxyArray which actually derives from Proxy, but (dynamically) implements
the properties, operators and methods of Array, adding sum() and clear()
methods.

Others may disagree, and I'd love to hear of good examples, but I would
actually think twice before using this. You're sacrificing type safety and
possibly performance.

On the other hand, Value Objects (closely related to DTOs [Data Transfer
Objects], and to be contrasted with Entity objects), are bread and butter
things.

http://c2.com/cgi/wiki?ValueObject

"Their identity is based on their state rather than on their object
identity. This way, you can have multiple copies of the same conceptual
value object"

i.e. two Date instances with the same day, month etc. represent the same
date, whereas

 var employee:Employee

might refer to different Employee instances at different times, in which
case we're talking about different Employees.

In a Flex app, VOs are typically created to represent "messages". Your API
(whether AMF, JSON or XML) will return flattened data which is then
converted into an object instance tree structure (not to be confused with a
class inheritance tree, if you're new to OOP).

If you are creating these VO classes yourself (as opposed to using ones
whose source is generated by tools provided by LiveCycle, WebOrb etc) you
should resist the impulse to add "business logic" to them. They'll typically
have nothing more than a few public properties.

So you might have both an EmployeeVO and an Employee class, where EmployeeVO
is a Value Object or DTO, and Employee is an entity.

Hope this helps. I'm sure others will weigh in.

- Richard
P.S. It's perhaps more appropriate to server-side work, but I love Eric
Evans' book on Domain-Driven-Design
http://domaindrivendesign.org/



On Thu, Jul 22, 2010 at 2:52 PM, mark.embrey <mark.c.emb...@gmail.com>wrote:

>
>
> I'm trying to wrap my feeble brain around these concepts.
>
> Are they the same? -similar? -completely different?
>
> Your feedback will be appreciated by this greenhorn.
>
> Mark
>
>  
>

Reply via email to