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  Announcements and General Discussion / Architecture / communication between several proxies and Facade on: June 08, 2012, 12:29:26
Hi,
maybe this post would fit better in "Getting Started", but, well, it is architecture-related.
Say I have a Facade, and a StartupCommand triggered on launching. This (macro)command tells a subCommand to initiate a communication with a WebService. On success, the WebServiceProxy retrieves the datas from the WebService.
The WebService address being dynamic and retrieved by a Preloader, I am wondering on how and where I should inject it? I mean, which Commands exactly should tell the Facade to register my Proxies (should I go "all-in-one" in my StartShellCommand), and how should I tell my WebServiceProxy that the address is available and it can start to connect?
My idea would be that the preloader dispatches a READY notification, registered in the Facade so the WebServiceCommand tells the WebServiceProxy to retrieveProxy(PreloaderProxy), so it can get the address from it? Is it ok? It seems like a lot of communication between classes, but is it the way it is supposed to work?
TIA!
2  Announcements and General Discussion / Getting Started / Help needed with FSM on: June 07, 2012, 03:11:06
Hi,
I'm trying to set up a Finite State Machine in my multicore app, but it seems a bit tricky for me.
So far, here is what I have done (code from example) :
in my ApplicationFacade.as :
:
registerCommand( ApplicationConstants.STARTUP, StartupCommand );
            registerCommand( ApplicationConstants.STARTED, PreloaderCommand );
registerCommand( ApplicationConstants.PLUMBING,     PlumbCommand );
            registerCommand( ApplicationConstants.ASSEMBLE,  AssembleCommand );
            registerCommand( ApplicationConstants.FAIL,         FailCommand );
in InjectFSMCommand.as :
:
var fsm:XML =
            <fsm initial={ApplicationConstants.STARTUP}>
           
                <!-- STARTUP THE SHELL -->
                <state name={ApplicationConstants.STARTUP}>

                   <transition action={ApplicationConstants.STARTED}
                                  target={ApplicationConstants.PLUMBING}/>

                   <transition action={ApplicationConstants.STARTUP_FAILED}
                                  target={ApplicationConstants.FAILING}/>
                </state>
But when I trace my events, I only get this :
:
[Starting debug session with FDB]
ApplicationFacade.initializeController()
ApplicationFacade.sendNotification( note/startup [object Stage] null )
ApplicationFacade.sendNotification( StateMachine/notes/action null null )
InjectFSMCommand
ApplicationFacade.sendNotification( StateMachine/notes/changed [object State] note/startup )
I know I will sound quite noob with my question, but I don't get why the transition action and target from <state name={ApplicationConstants.STARTUP}> are not triggered?
TIA,
Cyrill
3  Announcements and General Discussion / Getting Started / One Facade and two subFacades? on: June 03, 2012, 11:13:32
Hi, pretty new to pureMVC, I am in the situation of developing an app in which an important part is related to the WebContext (several heberging urls are possible, which will involve different graphic preLoaders, maybe ads, sometimes a limited time of connexion, etc), and the second part is a racing game with a consequent UI.
So I am wondering if having two subFacades would be considered good or bad, the first case being in my mind a way to simplify and separate access to proxys and commands.
What do you think about it? Is there a best practice for this?
TIA,
ABloch
Pages: [1]