So in the case of the SeaOfArrows web site, which code is available at http://seaofarrows.com/srcview/
and which is described in the puremvc.tv, the shell states STARTING and PLUMBING and CONFIGURING should be merged into one state.
I say this because STARTED is just the initial state with no associated commands. The action STARTED is sent by the initial command after the FSM is injected, thus jumping to PLUMBING. And the last thing the shell PlumbCommand does is trigering the transition to the CONFIGURING state with:sendNotification( StateMachine.ACTION, null, ShellFacade.PLUMBED );
So the call stack will look like this:sendNotification( StateMachine.ACTION, null, ShellFacade.STARTED );
sendNotification( StateMachine.ACTION, null, ShellFacade.PLUMBED );
async loading of xml
sendNotification( CHANGED, currentState, ShellFacade.CONFIGURING );
sendNotification( CHANGED, currentState, ShellFacade.PLUMBING );
As you say earlier it does make things a lot more complicated. So I'd be curious to know about:
1. What are the benefits in the case of SOA/MediaTurbine?
2. Any advice with this practice of chaining states without async break?
3. Any constraints in the use of this practice besides avoiding the use of the CHANGED notifications (these are sent in LIFO order)?