开发者

How do I organize an asp.NET MVC project to allow for a "lite" version

I am migrating an web forms app to ASP.NET MVC. Down the road we may want to offer a "lite" version of this application. This is a pretty vague concept, but I expect the underlying database would be the same, we would only simplify the UI, and users might even switch at will between the full and lite versions.

We would obviously want to reuse as much as possible, perhaps using the same model but different views. Some pages would remain exactly the same, others might be eliminated or combined with other pages.

What I am wanting to avoid is organising the project in such a way that it makes it hard to do this "lite" version if it eventuates that we decide to do it. At this point all I can think of is hav开发者_StackOverflow社区ing areas for controllers and views, organised by "full", "lite" and "shared".

Does anyone have any experience with multiple flavors of an application using MVC?


A better solution would be to have a custom Master Page and views much in the way that you can create a custom entry for mobile apps. See here:

http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx

This solution should work very well.


I would recommend looking at ASP.NET MVC Areas, and using a partial views for functionality. This is for MVC 1, I believe areas are supported out of the box by MVC 2.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜