FSMViz Version 0.2

FSMVis for pureMVC StateMachine Utility

FSMViz for pureMVC StateMachine Utility


source code here:
http://puremvc-utilities.googlecode.com/svn/tags/fsm_viz_0.2

So this is just the visualisation and the editing of the States and Actions. I still need to implement the saving out of state, and the export of the StateConstants.as

A few points and pointers:

  • If you do look at the code, please consider that it is a quick prototype, it will need to be optimised and architechtured (it doesn’t even have a FSM yet ;~/).
  • The visualisation is done using the Flare package
  • I am using the flex framework RSL, so the first time you visit, the app might take a fair time to initiate. However, from then on it will be cashed on your machine, so it will be much quicker.
  • I have used Joel Hook’s FSM diagram from his Piping the Machine tutorial as the initial diagram
  • You can add states with the form on the bottom left, the package is an optional field that allows grouping of states for a prettier layout using a dot as the delimiter (eg “io.out”, “io.in” or “display”). Then fill in the name and hit ENTER to submit.
  • Rolling over a state will highlight outgoing actions (red) and with ctrl down, all incoming actions (green).
  • Clicking on a state will switch to Edit mode, and bring up forms for editing the state and outgoing actions.
  • Rolling over the highlighted actions will popup their names
  • Clicking the top right x (or hitting ESC) will close the panels with out committing changes
  • Clicking the red X buttons will perminently delete the state/action (hitting DEL will delete the state)
  • Clicking the green tick (or hitting ENTER) will commit any changes
  • Clicking the strange-green-plus-arrow button (or hitting F1) will create a new Action. You can then give it a name and choose its target state.
  • 5 thoughts on “FSMViz Version 0.2

    1. Right ON! This project is cranking along nicely.

      One thing I’d suggest is to consider how it might be able to switch to different display styles. This is a really cool style and I’m not knocking it at all, but there are many other visualization styles possible, and I have a feeling it’ll be a desirable thing to vary in the future.

      -=Cliff>

    2. Cheers, and good point, I hadn’t thought about changing the style of visualisation. I was just pleased that I had got it working with the current one. It took me quite a long time to get my head around it.

      It shouldn’t be too difficult. The FlareDataProxy loads up and converts the JSON to a Flare Data Object. The Data Object is then send to the FlareVisualisation, and this interprets it into the actual visualisation. So I just need to create an Interface that the FlareVisualisationMediator communicates with, then we can swap the type of visualisation.

      cheers, will keep it coming (when I can)

    3. I’ve been taking another look, and I can see that I’m confusing the flare model and view slightly. So I’m going to remove most of the functionality from the flare view, and put it in the controller. So all the view does is send off events, which are relayed as notifications by the mediator.

    4. It looks great, Neil. Can’t wait till it actual exports so it can be used. I might add that being able to import an existing XML strucutre would be hugely benificial.

    5. Thanks Jason.

      I’ve been thinking about that. I was originally thinking of exporting just an AS file, with the all the state, action and notification names enumerated as constants, and the xml declared as a literal (just as the example in the StateMachine docs).

      However I think you’re right, being able to import and export the xml as an xml file is essential really.

      Another ticket on the list :)

    Leave a Reply

    Your email address will not be published. Required fields are marked *