source code here:
http://puremvc-utilities.googlecode.com/svn/tags/fsm_viz_0.4
Added the decode to AS3.
OK, so next I’m going to rip this all down and re-architecture it.
Added the decode to AS3.
OK, so next I’m going to rip this all down and re-architecture it.
OK, so I’ve added the ability to open from JSON or XML and also to decode to them. Originally, I was just going to save out to JSON as the main “file-type”, and export to an AS3 file, but after Jason MacDonald suggested it would be good to export/import the xml, I thought why not, it only took an hour.
The only things to note are that the XML looses all the meta data that the JSON preserves. And secondly, because of this, it can only import XML that uses the naming conversions outlined below.
Naming convertions:
I think that these are pretty uncontentious with the exception of the choice of delimiter for the prefix. This I think will be changable by the user.
All I have to do now is that all important conversion to an AS3 file, then I can rip the whole thing apart and rebuild it.
So, any suggestions as to deployment? Air, online with php service?, Zinc? (Zinc? LOL only joking!)
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:
Sorry I’ve been neglecting my blog recently. What with a brute force attack of malware, and working on some bread-and-butter projects, I’ve been a bit diverted.
However, I have found the time to play around with the FSM Visualiser and have been working on the best way to display and interact with it, so I’ll probably stick something fresh up with in the next week or so.
UPDATE: removed this demo due to it getting infected. Will upload a newer version once I have time to work on something
I have added some more functionality to the FSMViualisation.
Just a few notes:
1) I haven’t been able to add labels to the actions (arrows) yet (well, not prettily anyhow).
2) I have used the BundledEdgeRouter which makes those nice arrows. The problem with this is that any arrow that connects the same two nodes will lie on the same line.
3) at the moment, to update the diagram, I am having to edit my VOs, parse them into a Flare Data object, then construct a new Visualisation with it. It seems a bit expensive (not that affects the speed at all).
4) you can add States into a package. This does not affect any of the code that will eventually be exported, but does allow you to group the state together, and makes the diagram look far more appealing.
*UPDATED*
OK, have put together the first visualisation for a pureMVC StateMachine Utility markup tool.
The purposes of this tool are:
1) to make a state diagram for easier visualisation of the flow of your application
2) to create the FSMInjector class for your application, along with all the necessary constants, and the XML declaration.
I’m using the flare framework and what you see is really just a development from the Dependency Graph.
The visualisation data is stored as a text file in JSON, along with all the metadata associated with each node and edge. This will be the file format for saving and retrieving work. There will also eventually be an export routine that will convert this format into the FSMInjector.
At the moment we just have the ability to visualise, not to edit. The next pieces of functionality I will be working on will be:
1) adding states.
2) deleting states.
3) adding edges (actions).
4) deleting edges.
Mmmm I have just been looking at my ranking for some Google searches.
I have come to the conclusion, that for an ActionScript Developer working in Brighton with both ActionScript 2 and ActionScript 3 in Flash, Flex and Air, I don’t mention the fact enough.
I mean, if you put “Brighton Flash Developer”, “Brighton Flex Developer”, “Brighton Air Developer”, I just don’t show at all! Even “Brighton AS3 Developer” gets Nada.
So, I guess I need to be a little more proactive in my choice of words….
In the spirit of community, I am posting a list of AS3 developers whom I would personally recommend, should I (obviously top of this list) not be available.
These are top guys, contact them now!
Neil Manuell (revision)
Matt Pearson (zenbullets)
Matt Sayers (soplausable)
Owen Bennett (steamboy)
Rich Willis (rich text format)
Nikos Chagialas (devGallery)
and
Pedr Brown
These guys are all members of the award nominated social network of FlashBrighton
check out this very useful article:
Turning a Flex Actionscript project into a Flex AIR project
as far as I can make out, the only swcs you need for a flex as3/air project (no flex-framework) are:
playerglobal.swc
flex.swc
utilities.swc
airglobal.swc
airframework.swc
servicemonitor.swc
Been thinking a lot about the architecture of this. Currently the AssetLoaderProxy’s clients (ie the classes that actually do the loading of the different types of data) are Commands that are triggered by Notifications given by the AssetLoaderProxy. But I think this is a case “its pureMVC, let’s use Notifications”. The same effect could be achieved by an abstract client class and a client factory, without the overhead of sending a Notification, and it would make adding new clients far easier.
I’ve also created a client for loading Flex Modules, and added functionality to extract class instances from loaded SWFs.
I’m aiming for the end of July for my first alpha release of the AssetLoaderProxy and the LogProxy :-/ Hopefully I will have time, as it can be combined with my next job, which is a multimedia presentation tool to be implemented in pureMVC Flex and Air – YEY!
mmm… I guess I need to look at a FileStream client too. Best put that on the list.
Update
Thinking some more, lets do away with a factory altogether. We can register the clients directly, they can be added and removed at run time.