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?
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.
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.
Content. The Content folder contains static files like CSS files, images, and icons files. MVC 5 application includes bootstrap.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With