Tekool
|
 |
« 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 ?
|