I don't know if it exists some code generation method for Flex based on XML or Database Structure. For example, we want to manipulate a table in the DB, the most common task is (View/Insert/Update/Delete). And when we have more than 100 fields on the interface, it's rather boring to type them manually in Flex. Is there some ways to generate the Flex Code and the ActionScript functions for managing that. Which is the best way to do such a thing? Thanks for replying
+1
A:
You can use RestfulX if you have Ruby and Rails installed.
Define the table-fields/model-properties in a yaml file like this:
project:
- name: string
- notes: text
- start_date: date
- end_date: date
- completed: boolean
- belongs_to: [user]
- has_many: [tasks]
And then run
ruby script/generate rx_yaml_scaffold
All the details are on the Getting Started with RestfulX Page.
It creates an MXML Datagrid for viewing lists of your data, and a basic CMS/form view for CRUD operations. It's a great generator. The generated code renders into this:
viatropos
2010-01-22 11:19:15