A simple way to do in the Flex/AS side is in the VO with a static
function.
So for a UserVO factory you would have something like this.
public static function CreateUserVO( results:Array ):Array {
var newArray:Array = new Array();
for( var i:int = 0; i < results.length; i++ ) {
var obj:UserVO = new UserVO();
obj.name = results[ i ];
etc....
newArray[ i ] = obj;
}
return newArray;
}
This is quick but there its a simple Factory approach.
Renaun
--- In [email protected], "Stefan Schmalhaus" <[EMAIL PROTECTED]>
wrote:
>
> > It's somewhat personal perference
> > and just how you want to make it consistent
> > (ie: All Factory logic in PHP or AS).
>
> Ok, so this basically means if I do it all on the PHP side I have to
> set up a PHP VO class for each VO that exists on the Flex/AS side.
>
> If I want to do it on the Flex/AS side, where would the "factory
> logic" fit in with the Cairngorm framework? Is it part of the Command
> Class (while or before the model is updated)?
>
> Stefan
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/WktRrD/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/