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  PureMVC Manifold / Demos and Utils / Re: StateMachine - A PureMVC / AS3 Utility on: March 06, 2009, 09:49:03
Where is the most appropriate place to list the State/Action state machine constants for your application for a strictly AS3 implementation? I'm thinking is should be the main application facade.

The examples I have found are all Flex based and I've seen the constants placed in the main flex application file (StopWatch example) and then in the main application facade in the most recent LoginFSM example.

Also, being a newbie to AS3 and PureMVC, the LoginFSM has a nearly one-to-one correlation between notification constants, states and actions. In a typical PureMVC implementation this would not necessarily be the case since there are only a finite number of application states to move between but a vast amount of application notifications between all the Mediators, Controllers and Proxies depending on your application's complexity. Not all the application notifications are going to affect the state. I am looking more for an affirmation of what I just stated as opposed to trying to make a statement. Do I have it right?

It gets a little tricky jumping between Flex and Flash PureMVC examples since we are dealing with either the main Stage (AS3 project) or the main Application (Flex project).

Also, what is behind the convention of appending notification names with "actions/", "states/" etc. Again, it seems to imply a direct correlation between notifications and state changes and I'm pretty sure that is not going to be the case in the real world. It looks like any application notifications that also trigger state changes would be best served by this "appending" naming convention.

I understand the simplicity of the LoginFSM demo, but as someone who is "green" to PureMVC, I want to be sure that I am interpreting things correctly.

Ultimately I am asking if I am interpreting things correctly.

Any input would be appreciated, even if it's just "You're on the right path."

(If I get the hang of PureMVC over the next few weeks I will probably put together a bit more comprehensive AS3-only demo)

Thanks!
Pages: [1]