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]
Author Topic: Proxy referencing other proxies  (Read 8198 times)
Courseware Beta
Sr. Member
Posts: 50

View Profile Email
« on: March 23, 2009, 03:23:40 »

Is it bad form to have proxies referencing other proxies, so as to have access to the retrieved proxies data?

Or would it be better to use a command to create a proxy and send in the data from another proxy then.

execute {
facade.retrieProxy (myproxy);
facade.registerProxy( new Proxy( myproxy.getData() ) );
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: March 23, 2009, 03:49:56 »

There's no problem at all with a proxy registering, retrieving or removing another Proxy. Think of it this way: what if you had an app that runs on desktop, mobile and browser, all using the same model, but applyong different use cases against it according to the form factor and capabilities unique to each of those platforms? You'd want a highly portable, internally consistent set of model classes (proxies) that take care of themselves and do not rely on the app to keep them consistent. You'd package them in a library used by all three apps and manage them as a separate project. So they'd need to be able to interact with each other in this way.

Pages: [1]