开发者

Flex Code Generator based on XML or Database Structure

开发者 https://www.devze.com 2022-12-17 14:04 出处:网络
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 tab开发者_如何学JAVAle in the DB, the most common task is (Vie

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 tab开发者_如何学JAVAle 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


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:

Flex Code Generator based on XML or Database Structure


(source: github.com)

0

精彩评论

暂无评论...
验证码 换一张
取 消