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:
- Make a definition of the simbols accepted by the conversion. Document it (blog).
- Understand the .dia XML, what is gonna be used inside?
- Make a website that receives a file .dia
- Make a response page with the contents
- In this page, JS will read, convert (the XML inside .dia) and return a ruby code for the statemachine in a textarea.
- In future (since the future is unknown this may never happen..) there will be no upload to the server, a Flash reads the content and return to JS.
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.