Looking for RESTful Suggestions In Porting ASP.NET to MVC.NET

Posted by DaveDev on Stack Overflow See other posts from Stack Overflow or by DaveDev
Published on 2010-04-26T22:11:02Z Indexed on 2010/04/26 22:13 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

I've been tasked with porting/refactoring a Web Application Platform that we have from ASP.NET to MVC.NET. Ideally I could use all the existing platform's configurations to determine the properties of the site that is presented.

Is it RESTful to keep a SiteConfiguration object which contains all of our various page configuration data in the System.Web.Caching.Cache? There are a lot of settings that need to be loaded when the user acceses our site so it's inefficient for each user to have to load the same settings every time they access.

Some data the SiteConfiguration object contains is as follows and it determines what Master Page / site configuration / style / UserControls are available to the client,

    public string SiteTheme { get; set; }
    public string Region { private get; set; }
    public string DateFormat { get; set; }
    public string NumberFormat { get; set; }
    public int WrapperType { private get; set; }
    public string LabelFileName { get; set; }
    public LabelFile LabelFile { get; set; }

    // the following two are the heavy ones
    // PageConfiguration contains lots of configuration data for each panel on the page
    public IList<PageConfiguration> Pages { get; set; }

    // This contains all the configurations for the factsheets we produce
    public List<ConfiguredFactsheet> ConfiguredFactsheets { get; set; }

I was thinking of having a URL structure like this:

www.MySite1.com/PageTemplate/UserControl/

the domain determines the SiteConfiguration object that is created, where MySite1.com is SiteId = 1, MySite2.com is SiteId = 2. (and in turn, style, configurations for various pages, etc.)

PageTemplate is the View that will be rendered and simply defines a layout for where I'm going to inject the UserControls

Can somebody please tell me if I'm completely missing the RESTful point here? I'd like to refactor the platform into MVC because it's better to work in but I want to do it right but with a minimum of reinventing-the-wheel because otherwise it won't get approval. Any suggestions otherwise?

Thanks

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about ASP.NET