I've been doing some developing in Flash Builder 4 Beta. Seems from what I have read and implemented in some projects I am playing with, the new fx:Declarations tag is where you would declare your VO's along with other misc non visual elements.
So I read on a blog about '10 Best Practices for PureMVC'
http://www.websector.de/blog/2007/12/25/10-tips-for-working-with-puremvc/ that VO's, not being actors of the frame work are a good way to react to changes in the model without breaking the rules....
After reading this and trying to conceptualize a bit of ambiguity from that post it got me thinking about a possible solution to allow the view to react to model updates directly vs waiting on the proxy to send a notification, a mediator or command to process it, and finally update the view accordingly (possible not breaking the rules as the article so elegantly expresses?).
Here's my thought:
In your vo package, define a bindable Value Object class
In your view, declare an instance of the vo in the fx:Declarations tag. Then bind whatever controls to it, it's properties, etc...
On the proxy, create a property of the VO and have the responder cast the result to the VO property. Create your getter/setters for it as well.
In the mediator, depending on your style, either access the proxy through the facade and set the VO in the view to the VO on the proxy, or send a notification and let a command do it... Something like:
mediator.myView.myVo = proxy.myVo;
So, being of curious mind, I tried this and it did work. The view's declared VO was set before the data was ever received from the server and I saw the control populate after the data was received. I did not have to send a notification and notifiy a mediator or command of the data received.
Would this be 'breaking the rules'? I do have a couple of scenarios in my projects where an ArrayCollection of data objects may get updated by a new record or a record deleted. It would be nice to have this wireup between databinding of the control and the proxy just to save some time and code, but at the same time I would not want to paint myself into a corner down the road.
Any thoughts or advice?
I strip down my example and post the code if I can make time this afternoon.