1

In my application, I have a situation wherein the users will need to have the flexibility to customize the UI to a certain extent. The following are some of the customizations that is being discussed now...

  1. Change Label text associated with the with Use Input controls
  2. Mark a control as Mandatory/Read only/Hidden
  3. Assign a regular expression for the text box

Are there any recommended design patterns for my situation? Seems like I need to store all these in a database and worried about the performance impact if I have to read every element from the database for every page.

Thanks, Harsha

2 Answers 2

1

I would look at some of the open-source CMS or portal systems written in ASP.NET and see how they are doing UI customization (if they are).

Phil Haack has some insight at the following article:

Scripting ASP.NET MVC Views Stored In The Database
http://haacked.com/archive/2009/04/22/scripted-db-views.aspx

Apparently it's not an easy thing to do in ASP.NET. It's easier to do in ASP.NET MVC, because the markup is cleaner and you can control it with jQuery.

Sign up to request clarification or add additional context in comments.

Comments

0

The overall concept you are going for is not easy to have system wide, however the specifics you stated are fairly easy.

You'd have to setup some fields in a database for those values and then on the page load set those values on the page load. Pretty trivial from a 'how to'. Which your question shows that you 'get'.

Now unless you are using an Access Database :-), I don't think you have to worry about the performance hit. But if truly concerned, put some caching logic on those values so you only have to hit the database once. Though, be aware this will store the values in memory on the server, so if you are working with a very minimal hardware this could be an issue as well.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.