views:

97

answers:

3

I am planning to generate the UI from database. The platfrom will be ASP.net.

Can anyone help in identifying the best design pattern/Architecture that suits for generating the UI and events dynamically.

+2  A: 

See ASP.NET Dynamic Data on MSDN, that's my best bet. But some more info about your project would help. :)

Jakob Gade
Jakob, your answer is some what useful to me.In my scenario The UI lay out is saved in the database for each screen. like the text to be displayed and the type of input control ( textbox, dropdownlist ..) to be shown on the screen. once the user enters his data and submits the screen, entered data should be saved in the database.
kumar
+1 use dynamic data, since its built for it. @kumar I'd try to hook that into dynamic data, or vice-versa (tell dynamic data the config you want to use in a container you control).
eglasius
A: 

Check out the "two-step process" in the Orchard CMS:

http://whereslou.com/2010/09/12/orchard-moving-along-nicely

IrishChieftain
+3  A: 

Sometimes, the answer is, "Don't Try To Do That." Magically generating UI from your data structures is an old idea. I've seen teams try to do it in DBase 4, in Java, in C++/MFC, and in old-style ASP; also, OS/2 included an implementation of the idea. All of those implementations were practical failures, all following a similar pattern: the coder ends up with something that makes a vertical list of textboxes or whatever, and then the thing stalls.

If you had a brilliant enough idea to get around that problem, you wouldn't be asking a question this general. Since you don't, stay out of this particular cactus patch.

mjfgates
+1. 3 tier architecture is popular for a reason - going direct from DAL to UI gives me the creeps. Good luck managing your dependancies and change (and I don't mean that in a negative way).
Adrian K
I agree w/ @mfggates. Customizing the UI throws a lot of challenges, and soon you'll find that it just grows beyond your imagination. Result - abandoned projects etc.
Josh