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  PureMVC Manifold / MultiCore Version / One proxy for all modules on: August 19, 2009, 11:32:49

Is there a way to have one proxy accessed directly by different modules. Currently, I have a few modules and they access each other proxies through pipes. I am wondering if there are any utilities where I can have one general proxy to sit in a particular module and have the rest of the modules access this proxy directly so that I do not have to go through the pipes?

2  Announcements and General Discussion / General Discussion / Proxy to Controllers/Proxy? on: January 30, 2009, 07:16:10
Is it acceptable to send notifications from the proxy that will call a controller? For instance, I have data from a remote proxy and once updated, it affects another proxy without affecting the view yet (until later on).

Let's say ServerProxy and GameStateProxy. Upon receiving an update from the ServerProxy, I need to save the latest game state to a proxy and I created GameStateProxy. From the ServerProxy, I send notifications that calls controllers to update the data.

I was thinking if I were to instead send a notification to a mediator which then sends a notification to a proxy there will be additional steps. Furthermore if there a few mediators using this proxy, which mediator should handle this responsibility? This is why I find that proxy to controller is the easiest way. Is this right?

Is there a rule of thumb on how many proxies one should have in an application (e.g. game) like session proxy, remote proxy, list of character movieclips proxies etc? Should they be compacted into one? How do you handle proxy to proxy communications?

3  Announcements and General Discussion / Getting Started / Nested Views and its Mediator on: September 15, 2008, 03:13:33
Hi everyone,

My first post and first attempt to use PureMVC for a project! I went through the documentation and some tutorial sites to get a gist of the framework. I understand a view has its own mediator to interact with the rest of the application.

However, I am having some doubts when it comes to views nested within views (multi-views in a view?). I am building a sort of a shopping cart and the view components used are nested in each other. The main movieclip (shopping cart movieclip) that I will add dynamically has a few movieclips nested in it (details window, order list etc) and this is where I am unclear about the mediator and its view.

Here is my current structure:


   - StartupCommand
   - DataProxy
   - ShoppingCartMediator
   - OrderListMediator
   - ThumbnailsMediator
   - DetailsWindowMediator
   - ApplicationMediator
      - Thumbnails
      - DetailsWindow
      - ShoppingCart
      - OrderList
ShoppingCart component is the main component while the rest are all nested into it. I registered all nested components mediator in ShoppingCartMediator. Is this right?

So basically here how's I set it up:

-Main document class creates concrete facade (ApplicationFacade.getInstance())
-ApplicationFacade sends STARTUP notification
-StartupCommand tells facade to register ApplicationMediator, register DataProxy
-DataProxy sends notification that it has completed retrieval of data
-ApplicationMediator listens for this and handle notification by initializing the shop
-During this initializing the facade registers ShoppingCartMediator
-In ShoppingCartMediator constructor, I then register the rest of nested components mediator

Up to this far, I am creating mediators only for views that change often or are affected by the model. Am I on the right track here?  :-\ By the way, I am using CS3.


P.S. Sorry if I overlooked already existing topics on this issue.

Pages: [1]