Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple ASP.NET MVC projects that builds as single ASP.NET MVC Application

We want to split our large asp.net mvc web application into multiple Visual Studio projects so that each team can independently on their visual studio project.

Desired structure is:

  1. ASP.NET MVC application that is responsible for the base UI
  2. Module 1 - VS Project (Does this need to be a ASP.net MVC App or .dll?)
  3. Module 2 - VS Project (Does this need to be a ASP.net MVC App or .dll?)
  4. so on....

Each module should contain it's own controller & views that are responsible for functioning of the module. T

How to split the ASP.NET Application in to multiple projects and then merge them as a single website during build process?

like image 972
Gopinath Avatar asked Jul 29 '09 13:07

Gopinath


People also ask

Should you split your ASP.NET MVC project into multiple projects?

It shouldn't! That's why it's designed in a modular way. In most web applications out there, we version and deploy all these assemblies (Web, BLL and DAL) together. So, separating a project into 3 projects does not add any values.

Is ASP.NET MVC a single page application?

ASP.NET - Single-Page Applications: Build Modern, Responsive Web Apps with ASP.NET. Single-Page Applications (SPAs) are Web apps that load a single HTML page and dynamically update that page as the user interacts with the app.

Is it possible to combine asp net webforms and ASP.NET MVC and develop a single Web application?

Luckily, the answer is yes. Combining ASP.NET Webforms and ASP.NET MVC in one application is possible—in fact, it is quite easy. The reason for this is that the ASP.NET MVC framework has been built on top of ASP.NET.


2 Answers

ASP.NET MVC V2 has a feature called Areas which allows you to have separate projects referenced by the main application. Check out ScottGu's post.

like image 161
Darin Dimitrov Avatar answered Oct 02 '22 19:10

Darin Dimitrov


The problem is sorted out by just creating multiple MVC projects and merging the output at the end by simple copy & paste :)

here is the structure we followed:

  • MyApp.Web.Shell (just contains themes, css, js & images required for the web app)
  • MyApp.Web.Home
  • MyApp.Web.UserManagement
  • MyApp.Web.DeviceManagement
  • MyApp.Web.ContentManagement
  • .....etc...

At the end we are using build scripts to merge output of all the projects and generate the files required for the total web app to run.

If you need any help in implementing similar solution, get in touch with me at link text

like image 32
Gopinath Avatar answered Oct 02 '22 19:10

Gopinath