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: Q;Correspondence of remote proxies to mediators  (Read 9611 times)
Courseware Beta
Sr. Member
Posts: 81

View Profile Email
« on: July 20, 2009, 07:31:17 »

I understand there are several 'right ways' to organize your classes in a PureMVC, but I'm looking for general best practices to help when initially architecting an application.
For instance, I know I will need at least 3 different remote proxies for the app I am building. A UserProxy for registration and login, an UploadImageProxy for initial image upload(from the desktop), and a CreateImageProxy to save the modified image data to the remote server.
Does this imply I will need corresponding mediators, or is the mapping of proxies to mediators arbitrary? ie in the above example I was considering the following
- a 'header' mediator that houses global items and listens to 'login' events in a corresponding 'header' view, and then retrieves and interacts with the UserProxy.
- a CreateImage mediator which interacts with (directly or via commands) BOTH the CreateImageProxy and the UserProxy since this CreateImage mediator also contains- a registration form view component.

If I were to add a publicly viewable gallery view component, would that imply a corresponding GalleryProxy(to retrieve the images) as well as a corresponding GalleryMediator?
Global Moderator
Hero Member
Posts: 2871

View Profile WWW Email
« Reply #1 on: July 21, 2009, 07:51:52 »

No, the mapping of Proxies to Mediators is entirely arbitrary. One FishProxy and one LoafProxy could feed a multitude of hungry Mediators.  ;)

Pages: [1]