dynamic controls: architect advice needed
First of all, sorry for my poor english. I don't know if I'm in a good news
group but would like to have some advice/feedback on a task I have to do.
Before telling you what I have to do I would like to put you in the context.
My company develops an ASP.NET application (classic web forms) to manage
informations about internal employees. Users have to fill many forms with
many fields to collect data.
Some fields are known in advance like employees firs name, last name, phone,
etc. To collect data for these fields we use classic .ascx controls with
textboxes, dropdowlists, etc. etc.
But the problem is the wish to allow administrators to add their own fields
(textboxes, dropdownlists, checkboxes, etc.) from administration menu on the
fly for every form.
Ex: for the form "Employee Personal information" administrator would like to
collect more data than the name, phone and other fileds in the form. He adds
for exemple a TextBox "Your prefered color" and one DropDownList "Your
prefered car" with values form database lookup table. The idea is to build
your form without asking a programmer to add more controls to the forms in
the aspx pages.
So when the employee fils the form "Personal Information" these two new
fields should be displayed and data saved back to the database. More, the
search engine should search on these two fields.
My idea is to save each added control by administrator in a datababse table.
Each control has its own collection of values (collection of one item for
textbox control for exemple).
the idea is to provide a weak coupling with GUI and a databse. I would not
like to do all the stuff from scratch if we move to wpf. I know that there
will be some plumbing code to create dynamicly controls from the database
but the business logic shouldn't be donne in each aspx page where we want to
display those controls.
I also checked an XML field in SQL Server to store my forms in XML but I'm
affraid that the performances will be poor. The queries for the search
engine will be also not easy to do.
The same for infopath which I think do not fit my needs.
Maybe should I use an template for controls ?
The features I have to ensure:
- weak coupling with GUI and the database
- translation of labels for my controls
- storing values of these controls
- easy to search for the search engine.
Sorry for such a long post but if you have an idea of how can I achieve my
goal or just some hints to point me to the right direction I will
|All times are GMT. The time now is 12:17 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.