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

Pages: [1]
Print
Author Topic: Proxy and data from multiple sources  (Read 8378 times)
2morrowMan
Newbie
*
Posts: 2


View Profile Email
« on: August 27, 2010, 08:30:46 »

Hello Cliff.
In my social app I have one mediator and component thats displays users ratings. Data for this mediator loads from different sources. First loads data from my site(users ids, rating, type, etc) and then loads data from social network site (user name, photo, etc) base on data loaded previously.
Question is what is the best way:
1) Use one Proxy (UserRatingProxy) to load data from both sources, group it in collection and then send notification to mediator?
2) Use two proxy (for example UserDataProxy and UserProfilesProxy). Use mediator to initiate sequential loading with commands and data from first proxy, wait for data, group it and display?

Thanks.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 30, 2010, 05:08:22 »

I believe I'd go with option 1. It will be a slightly more complex Proxy, but less complexity in the app trying to manage the sequencing. Of course you could probably use the Loadup utility to manage this as well. See the LoadupAsOrdered demo.

-=Cliff>
Logged
2morrowMan
Newbie
*
Posts: 2


View Profile Email
« Reply #2 on: August 31, 2010, 08:42:26 »

Thank you! :)
Logged
Pages: [1]
Print