Equivalent of Swiz CommandChain

dwabyick's Avatar


08 Nov, 2009 07:25 PM

Like PureMVC, I wish Robotlegs had a good CommandChain pattern for asynchronous commands. I did see the example and know the basics are possible. However, I really like Swiz's pattern to initialize complex parallel/serial commands all in one place. It would be great to combine Robotleg's Flex agnostism with Swiz's targeted patterns. Has anyone created an extension to support this?

On a similar note, I really like Swiz's MXML based configuration. I'm considering creating a Flex MXML adapter to Robotleg's context, if it doesn't already exist.

  1. 1 Posted by dwabyick on 08 Nov, 2009 07:39 PM

    dwabyick's Avatar

    To give a little context for this. When you have a complex process, such as initialization of an AIR app (loading config, checking connectivity, autoupdate, local data/creds, auto-authentication, remote data loading), its not clear where this management should live.

    I want to be able to declare this process all in one place, but it doesn't belong in view mediators, commands are stateless, and this spans multiple services.

    My thought is that the answer to this is promoting 'controllers' to a first-class framework entity. In particular, they should be used to manage complex, stateful processes not associated with a particular view or service. In this case, it would be called InitializationService.

    Would love to hear how people address this - as its one of the harder problems when implementing a framework.

  2. Support Staff 2 Posted by Joel Hooks on 08 Nov, 2009 08:52 PM

    Joel Hooks's Avatar


    I ported the PureMVC StateMachine to robotlegs and I think it provides this sort of stateful process of commands.


    here's an example of it in action.

  3. Support Staff 3 Posted by Joel Hooks on 08 Nov, 2009 08:57 PM

    Joel Hooks's Avatar

    I also brought over the Loadup, though this one isn't a port so much as a rewrite:


    still WIP, but it works.

  4. 4 Posted by dwabyick on 09 Nov, 2009 05:32 PM

    dwabyick's Avatar

    This looks cool. One question - where are the utilities SWC that the project references? I can definitely just hook up source code, but would prefer the SWC, if its available.

  5. Support Staff 5 Posted by Shaun Smith on 10 Nov, 2009 12:13 AM

    Shaun Smith's Avatar

    "My thought is that the answer to this is promoting 'controllers' to a first-class framework entity."

    There is no real need to promote controllers directly into the framework in my opinion. One can implement a controller by extending Actor and using it's eventMap to respond to async operations.

    I do agree that it would be great to adopt the useful patterns from Swiz (and Flight!). This will definitely happen in the up-coming months.

  6. Stray closed this discussion on 11 Feb, 2011 11:23 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac