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: Non-visual module used as core in multicore  (Read 4264 times)
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« on: September 15, 2009, 08:00:13 »

I often have the same problem. I need to use a connection protocol or a specific type of server that requires me to have a group of 3 or 4 proxies to manage each type of connection to do near the same thing. I have to use alternatively one or another type of server in different build of the same app.

I have no problem to implement the same interface in my different proxies type, use the same commands when needed and decide which type of proxies and command to use when registering command/proxies. But I find more elegant not to have to worry about the two different proxies type simultaneously in the same project, even if I separate them into different packages. A native implementation of the IOC in PureMVC here would have probably been the solution to my problem. But I'm afraid that looking into and using Spring ActionScript for PureMVC or another solution take me too long for the project I'm working on.

So I wonder if this might be a good practice to create a core that would have no visual elements at all. Only a mediator for the application class, a group of 3 or 4 proxies and at most one state machine to manage the connection / disconnection when it is persistent one. Pipes literally controlling the module from the shell and other modules, even if I have some basic controller for initialization ?
« Last Edit: September 16, 2009, 01:58:00 by Tek » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: September 17, 2009, 09:14:36 »

Absolutely, this is a good idea. A core does not need to have a visual component or purpose in the View. A service module that has a clear message protocol for communications could easily be swapped for another server module speaking the same protocol but talking to a different service and returning its results over pipes.

-=Cliff>
Logged
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« Reply #2 on: September 17, 2009, 12:36:07 »

Thank you Cliff for the answer.

I will use Flex modules with an API defined by the Pipes message that each module can send or receive.
Logged
Pages: [1]
Print