Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Architecture / Complex (Nested) VOs on: March 05, 2009, 03:16:28
I’ve started my first project in puremvc; using fabrication.  Great work guys, really like the framework!
I’m a pure flash / as3 developer and it’s tremendously useful to have such a powerful framework I can use in this environment.

My only very small criticism would be the lack of examples for pure flash.  However once I found the hello world fabrication (http://trac.puremvc.org/Demo_AS3_Flash_HelloFlash) example I was off! 

Anyway I have a question about creating complex VOs.

I have 3 bits of data which my view needs to do its magic. 
  • The first bit of data is gathered from an XML file. 
  • Second bit of data is requested from a remote service which is referenced from within the XML file.
  • The third bit of data are files (mp3s) referenced from the remote service return.

The view needs all this data to be loaded.

It also needs to know how second bit of data relates to the first and how the third bit of data relates to the second.  The order is the key bit of information which is required about the relationships.

So I’m thinking I need 3 different proxys, 1 for each VO.
  • Data1Proxy
  • Data2Proxy
  • Data3Proxy

And 3 different VOs
  • Data1VO.arrayOfData2
  • Data2VO.arrayOfData3
  • Data3VO

The problem with this is that Data2Proxy and Data3Proxy rely on data to be ready (from the previous Proxy) before they can do anything.  I could create commands to chain execute each proxy (or use the startup manager) but in reality I wouldn’t want to ever execute Data2Proxy without first having Data1Proxy do its thing.

Really I want 1 command which I can run to get all this information and notify me when it’s done.

I hope this makes some kind of sense: I don’t feel like I’m on the right track with this. 

Does anyone have any thoughts on what I might do which is better?

Many thanks!
 
Pages: [1]