views:

46

answers:

1

I am working with an ASP.Net web app that allows users to create an "application."

They define fields and their data types. Based on that, I generate a query to create a table.

I would like to use the metadata from the table to generate an input form to display to users.

  • Is this a good approach?
  • Has anybody done a similar project that can share some lessons learned?
  • How about creating and altering tables at runtime?
  • Does anybody see any problems with that?
+1  A: 

You will need to accomadate for all userdefined field types (text, number lookup, dropdowns, check boxes, dates, etc).

These will have to be save to the database per field type per user per forms.

Further you will have to allow the user to define their own layout. this will mean that you have to same the entire form layout, per user per form per control.

There are some apps available, that applies this logic, (I think SharePoint has this type of approach).

I have done this once before, but it was using WinForms, using XtraLayoutControl , DevExpress Layout Controls.

This did allow me to save the layout, but did not create the controls for me automatically. I still had to implement that my self.

If you have any specific questions, regarding db table layout, client integration, or performance of these queries, Please feel free to ask.

astander
Thanks for the comments. I'm not so concerned about the layout. Of greatest interest to me is whether this is a good approach. Is using DB metadata for my application's metadata a good idea? Is modifying the table structure at runtime a good idea? What are alternatives?
Matthew