This project is gonna be halted for now due to a change on my priorities.
The functional code already produces will be public for whoever wish to continue.
I would gladly resume this work in the future if possible.
This project is gonna be halted for now due to a change on my priorities.
The functional code already produces will be public for whoever wish to continue.
I would gladly resume this work in the future if possible.
Had a little drawback developing dia2statemachine because JS weird way of being poo Object Oriented.
Just so people know, there are setters and getters in DECENT BROWSERS , but of course IE doesn´t use them! They can significantly simplify the code, but what the helll, let´s keep it compatible at this time…
I was having lot´s of trouble to get a value out of a class in JS, turn´s out that, if there is a var a = true; inside a class I don´t have access to it from outside from calling, object.a -> (undefined), in the other hand, if it is declared inside the class as this.a = true , then I have access outside (set and get) but that is not O.O.
So a very simple way to make getters is>
Having so much fun right now! There´s been long before i had any fun on programming anything like I´m enjoying now 😀 the code is pretty nice so far!
Some Snippets:
To get the XML into HTML I built a really small ruby script that convert the file into a JS var and considering using the same script on the website to remove some of the ‘garbage’ out of the XML and print it on the page.
First of all, download DIA! =D
Select UML for the sheet pallet. Only a reduced set of the tools will be interpretated, the X´s will be ignored.
These is the selection of tools available:
Ok! A quick note about the arrows, is that the 3 of those can be used under any TRANSITION circunstances (since all connect state with state), but you will see if you try, some arrows fit better in the indicated manner.
Soon part 2
Hello !!!
After a loooong while I decided to dev something just so I don´t get too rusty!
The concept is: Statemachine is a fine implementation of FSM for ruby (act_as_state_machine is also an option). The author wrote a nice guide for layperson (or forgetful like me :P) BUT still something is missing! In all examples there are diagrams, those are very necessary for us to understand what to implement in the machine, but a huge one´s mat get really confusing. The solution would be to convert the Diagram into Ruby code!
The plan: Dia is a great and easy to use diagramming tool, win and linux able, it´s save file is in XML.What i´m gonna do is make a JS that is able to parse it´s code and generate ruby =)
Execution:
Purpose: I love ruby lang, every Computer Science student must at least once use a Finite State Machine, maybe this interface will make things more attractive so he have a taste of ruby programming..
Long automata’s description may be very boring and error prone this should make the assembly easier.