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: Local and remote proxies  (Read 7959 times)
moneyhaus
Newbie
*
Posts: 2


View Profile Email
« on: April 26, 2008, 09:56:57 »

Hi all,

I'm currently rebuilding a bit of a messy app using PureMVC (which I find intriguing). My question is about proxies -- this is an AIR app that reads in two XML files for most of the model. The XMLs are stored locally and initialized from there, but the user may download the XMLs remotely. Currently, I have that set up as a remote and local Proxy for each XML file. The remote Proxy is queried for new information and downloads the XML, after which it sets the local Proxies data object (my throw in some data manipulation in there). Only the local Proxy's model is shown in the views. What do you think of doing it this way? Is there a better way of doing it?
Logged
moneyhaus
Newbie
*
Posts: 2


View Profile Email
« Reply #1 on: May 05, 2008, 04:48:16 »

In case anyone's interested, I ended up reworking this to having one remote proxy class. On instantiation, it receives a VO with info for the service delegate, as well as with the name of a "requester" proxy, which may be one of the "local" XML proxies. On return of the remote call, the remote proxy sets the data property of the requester proxy to that of the returned data and then removes itself from the facade.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: May 05, 2008, 07:18:15 »

This sounds like a perfectly good way of doing it.

-=Cliff>
Logged
Pages: [1]
Print