简体   繁体   中英

ASP.NET MVC multiple intranet projects

I have been working on ASP.NET MVC for a while and loving it so far. But I am hitting a wall now.

I am working on a new intranet site, where I will have to host many projects, ranging from couple of pages to full blown applications. I have been using Areas to differentiate between the projects. It's all good so far.

Now, the solution is too big and every simple change I need to compile the whole projects which consists of all the areas (multiple projects). I am always afraid of making changes to live once I compile and upload the dll.

Is there anyway that I can hold multiple projects sharing same layout but to compile each projects into separate dll?

Thanks in advance

EDIT

Thanks guys, I followed Portable Areas as an ASP.NET MVC Project and he seems to have explained things much easier in a step by step to get started.

Have you considered using Portable Areas feature in the MVCContrib? - read a post about it here

Also read the response from Eilon in another question Multiproject areas in ASP.Net MVC 3


If the portable area solution won't work for you then it's probably time for a refactor/restructure of your single web project into separate web projects. As it is an intranet site you'll probably want to setup some sub-domains to allow you run separate websites under the one domain.

Eg.

www.yourdomain.com

admin.yourdomain.com

calendar.yourdomain.com

etc.

This way you can segregate your functionality and update different areas of the intranet without affecting others. You may of course need to look into single sign-on across your sub-domains depending on your site.

I would normally extract all common functionality into a core project (class library) which may be used by all of the web projects, and keep each your web projects as lightweight as possible. Then you can create separate solutions for different web projects or groups of web projects.

Also consider looking into continuous integration/build server so that you can easily check if a change you make in one project is affecting other projects that may not be in your current solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM