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 / Getting Started / cross-referencing proxies on: July 23, 2009, 02:41:38
I have 3 proxies running at startup making remote service calls, and once all 3 are returned, I need to cross reference them. By that I mean the following:
The 'interviews' data is an array with each interview having a one-to-many reference to a fundID.
The 'funds' data contains a one-to-many reference to a groupID with each fund having a fundID.
The third data set is 'groups' with each group having a groupID.

After the cross-referencing is done, I would, for example, be able to reference the name of a group associated with a particular interview thus: interview.fund.group.name

I obviously cannot do the cross-referencing until all 3 sets of data are available. How do I flag when all 3 data sets are available within pureMVC?

The only way I can think of is for each proxy to send a 'data loaded' notification which is responded to by a data-checking command. This would retrieve references to the 3 proxies and query them for whether the data is available. If it is, it then either performs the cross-referencing or send a notification which is responded to by a cross-referencing command.

Am I close with this or is there a much nicer / more correct way of doing it within pureMVC?

Many thanks for any help.
Pages: [1]