Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.net mvc 2 solution folder structure

What is the best way to organize a MVC2 web project (as complex as stackoverflow)? should i have everything in one project? if not, how should i separate the projects and folders?

like image 288
Comma Avatar asked Apr 26 '10 11:04

Comma


People also ask

What is the use of App_Data folder in MVC?

The App_Data folder of MVC application is used to contain the application related data files like . mdf files, LocalDB, and XML files, etc. The most important point that you need to remember is that IIS is never going to serve files from this App_Data folder.

What is the use of App_Start folder in MVC?

App_Start is just another folder that groups together ASP.NET MVC configuration, which in previous versions of ASP.NET MVC was done in Global. asax . ASP.NET MVC introduces more and more configuration elements, and this folder is ideal to place this configuration.

Which folder in an MVC application contains the style definition files?

Content. The Content folder contains static files like CSS files, images, and icons files. MVC 5 application includes bootstrap.


1 Answers

There's no best way. There are good and bad ways. Having everything in the same project is definitely not a good way. Big projects should be separated in layers and each layer usually goes into a different assembly so that it can be reused in other projects. For example you could have Models, Data Access, Business Logic, Web.

Jeffrey Palermo has a series of posts about the onion architecture which is worth reading.

From performance standpoint it is considered a good practice to have less bigger assemblies than many smaller assemblies.

like image 77
Darin Dimitrov Avatar answered Nov 10 '22 20:11

Darin Dimitrov