Title: Best Practice

Hi all,

I have an architectural question. Let me tell you the scenario first.

A tree control with bunch of nodes and each node has some attributes in the database, which vary from node to node. The nodes hold IDs and upon selection, the app needs to get all the attributes and build a form with a bunch of check boxes. Each attribute has multiple values. You can have 10 attributes for a node and each attribute with any number of values. Checkboxes represent the values for those attributes.

Attribute1
        CheckBox1       CheckBox2       CheckBox3
        CheckBox4       CheckBox5

Attribute2
        CheckBox1       CheckBox2
........

The way I structured is that I'd build the forms as mxml from CF instead of hitting the db for every node selection and doing complex processing to figure out the attributes and values that I need and passing the data back to flex to build the UI. The way db is setup is not very friendly to offer easy retrieval of the attributes. Anyways, a nightly process builds the forms as mxml files using CF and compiles the application to make those forms available. It works good if number of forms is not big. But unfortunately, I can end up with over 900 forms that way. 900 cached mxml files, and I don't like it (please let me know if I should like it and I'll change my mind).

What if my nightly process builds the dataprovider for each node and saves it in the db? When I select a node from the UI, I pass that dataprovider back to flex from CF and build the forms on the fly using repeaters (only if I knew how to build forms like this using repeaters).

The structure of DP is:

Attributes (Array)
        Attribute (Structure/Object)
        Attribute["name"]
        Attribute["rows"] (Array)
                Attribute["rows"][1] (Array)
                        Attribute["rows"][1][1] (Attribute Value)
                        .....

I need help in coming up with the better architecture for this piece of the app. I will appreciate any help that I can get (like always)

Thanks

Agha Mehdi
IDT - eBusiness Program Manager
Work: 408.284.8239
Fax:   408.284.2766



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Computer software testing Macromedia flex Development
Software developer


YAHOO! GROUPS LINKS




Reply via email to