I looked around the Internet for the best way to organize an ASP.NET MVC2 project. I have only seen examples of people using the default template for MVC2 projects. But is it better to organize a project if it contains a large number of files?
We are developing an application that is largely built around jQuery for the user interface and ajax using JSON. So, as you can imagine, we will have many custom .js support scripts.
In our solution, we placed all our support libraries (third-party and user-defined) in the respective projects. The MVC2 project, which is also in the solution, uses the default MVC2 template.
In the MVC2 project, the “launch” structure is still virtually unchanged. In the Controllers directory, we have each AccountController.cs and HomeController.cs controller (for example). In the submission catalog, we have three subdirectories Account, Home and Shared. In the Scripts directory, we also divided this into three directories: Account, Home, and General. And finally, we have a catalog of models, which is also divided into subdirectories Account, Home and Shared.
As you can see, we did not deviate much from the main template. But, when we start adding material to this, we understand how cumbersome this can be when we get up to 20 or 30 views and 100 .js support files.
Any suggestions would be great!
Thanks.
source share