ASP.NET MVC application level soft coded settings -


i working on asp.net mvc 2.0 multi-presentation web application use common codebase support different websites. these websites differ in following aspects:

  • each website have own headers, footers, images, css etc (i guess website specific master pages)
  • some of ui elements different based on soft-coded settings @ website level

what best approach handle these requirements? should storing these website level soft-coded settings in database or multiple config files? might have provide admin ui manage these soft-coded settings. how access these settings in different layers (mvc, services, repositories etc) of application?

i need suggestions experts.

regards, alex.

develop sort of presentation object model (or possibly aggregate if you're ddd inclined) , persist db. per-user or per-site (if it's multi-tenanted app you're building) , mvc easy build html helpers accept these presentation model objects , render out customized header, css, images etc.

potential long-shot practical example:

let's 'tenant' called site - you'll prob have site object in model. property of site webpresentation object. webpresentation may have series of child objects , lists methods reading css, css files (for <link> elements in document head), images, etc. may have service or set of service functions persisting/validating webpresentation objects (or may try have functionality come off objects themselves- think .save()). won't go how persist data db (don't want insult you). views, design them (perhaps partial views) such custom webpresentation html helpers render customizations out views or <head> sections of masterpages.

i hope example useful.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -