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: recommended mappings of commands to proxys  (Read 5646 times)
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« on: July 11, 2009, 11:56:11 »

Right now I have just one  command with a switch case statement handling all my communication from several mediators to one Proxy.

But I am refactoring to have separate proxies for each type of data I am dealing with.

I assume then that my single command must be split up, one command per proxy since each command only knows about one proxy.
Is this a recommended best practive?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



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

You don't have to route all communication with proxies through commands. Mediators are allowed to retrieve and communicate with proxies, and in fact generally retrieve and keep local references to frequently used proxies. You only really need to go through a command if you're going to get some reuse out of it, such as when several mediators all call the same method  on a given proxyl.

-=Cliff>
Logged
Pages: [1]
Print