dynamic UI builder from database

J

Jay

Hello..
this is more of a design question.
I need to develop an app that provides UI (CRUD =
create/review/update/delete) operations for a database table.
e.g: sample table layout is, (this already exists)
Name:
value:
(Value can be an number/char/datetime etc)
value_type:number/char/datetime.

Based on the table values in the table I need to create the UI.
For e.g: The View operation will show : (these are the values in the table)

User_limit 30
user_Message Cannot access
user_expire_date 10/10/2010

Now for the Edit/create operation: I need some meta-data information to
create the appropriate UI controls.
e.g: If I want to edit user_expire_date, I need to diaply the datetime
control.
for user_limit - need to display number values 0-100.
for user_message: display a simple edit box control. I also need to know the
character limit.

Apart from these I might also need, the order of display for the particular
"name".
or even group them together..if I have 100 entries..I might use the "group"
name to filter how much to display.

where do I store this kind of meta-data information?
is it appropriate to have an
1. XML associated with each of these entries.Like this..
Name:
value:
value_type:number/char/datetime.
mete-data: <min_limit/><max_limit/><group_ID/><display_order/>

or
2. Have it in another database table?
table1:
-----
Name:
value:
value_type:number/char/datetime.

Meta_data_table1
-----------------
min_limit
max_limit
group_ID
display_order

Which is one more efficient? more maintainable?

thanks in advance for your support!
 
M

Mr. Arnold

Jay said:
Hello..
this is more of a design question.
I need to develop an app that provides UI (CRUD =
create/review/update/delete) operations for a database table.
e.g: sample table layout is, (this already exists)
Name:
value:
(Value can be an number/char/datetime etc)
value_type:number/char/datetime.

Based on the table values in the table I need to create the UI.
For e.g: The View operation will show : (these are the values in the
table)

User_limit 30
user_Message Cannot access
user_expire_date 10/10/2010

Now for the Edit/create operation: I need some meta-data information to
create the appropriate UI controls.
e.g: If I want to edit user_expire_date, I need to diaply the datetime
control.
for user_limit - need to display number values 0-100.
for user_message: display a simple edit box control. I also need to know
the character limit.

Apart from these I might also need, the order of display for the
particular "name".
or even group them together..if I have 100 entries..I might use the
"group" name to filter how much to display.

where do I store this kind of meta-data information?
is it appropriate to have an
1. XML associated with each of these entries.Like this..
Name:
value:
value_type:number/char/datetime.
mete-data: <min_limit/><max_limit/><group_ID/><display_order/>

or
2. Have it in another database table?
table1:
-----
Name:
value:
value_type:number/char/datetime.

Meta_data_table1
-----------------
min_limit
max_limit
group_ID
display_order

Which is one more efficient? more maintainable?

thanks in advance for your support!

Which is more maintainable and more efficient would be to keep the XML in a
database table. After all, XML is just string data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top