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: Call the proxy methods through JunctionMediator?  (Read 7386 times)
mariusht
Full Member
***
Posts: 26


View Profile Email
« on: November 19, 2009, 07:47:29 »

Hi,

I would like to know if calling proxy methods through JunctionMediator is a good practice?

Scenario 1:
I send a message to the module, junctionMediator receives a message and call proxy methods.

Scenario 2:
I send  a message to the module, junctionMediator receives a messages and sends out note. Corresponding command is triggered which call proxy methods.

Thank You,
Mariush T.
http://mariusht.com/blog/
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: November 19, 2009, 03:19:45 »

There's nothing wrong with Mediators, including JunctionMediator subclasses from forming collaborations with Proxies.

If the core is small (only one or two Proxies) then Scenario 1 is the path of least resistance and should be fine.

If it is a large core with a lot of Proxies, it might still be fine, but you're probably better off going with Scenario 2 to avoid having such a bloated Mediator with too many responsibilities.

-=Cliff>
Logged
mariusht
Full Member
***
Posts: 26


View Profile Email
« Reply #2 on: November 19, 2009, 05:50:36 »

It makes sense, thank you.

Mariush T.
http://mariusht.com/blog/
Logged
Pages: [1]
Print