Mostly when started programing in ADO.NET I never found any detail folder structure with some files but when started work in asp.net MVC there are some additional folder with files I try to understand those at my end and gather some information I am sharing all that information’s at my end I hope it will hell be helpful for developers. Before starting if you want to check detail about ASP.NET Web Project Folder Structure you can review with linked article.
The target audience are those with little or no familiarity with asp.net MVC Project structure, or who may be looking to review the fundamentals. If you are an experienced MVC developer, there is probably not much here for you, although your feedback in the comments is greatly appreciated.
App_Data:
It does not have special meaning it was exist in earlier web form project also used to store database so this is same as before.
App_Start:
This run code that help configure our asp.net MVC applications. Generally we will not mess with it much, normally we do not need to play this file much. It is just another folder, which group ASP.NET MVC configuration.
1) AuthConfig – Registers external authentication providers. See ASP.NET MVC external authentication providers for more information.
2) BundleConfig – Registers you CSS and JS so they can be bundled and minified. Bundling and Minification
3) WebApiConfig – Only applicable if you are using WebAPI. It can use to configure Web-API-specific routes, any Web API settings and Web API services. http://www.asp.net/web-api See also Configuring ASP.NET Web API 2
4) FilterConfig – Registered Global Filters. These filters are applied to every Action and Controllers.
5) RouteConfig– ThisASP.NET Routing module is responsible for mapping incoming browser requests to particular MVC controller actions. You can review Routing basic in asp.net MVC.
Content: Content kind of open Entity here things like CSS file JQuery, UI theme are stored.
Controllers: The Controllers Folder contains the controller classes responsible for handling user input and responses. The MVC framework maps differently. MVC maps URLs to methods. These methods are in classes called “Controllers”. Controllers are responsible for processing incoming requests, handling input, saving data, and sending a response to send back to the client. Please make sure that Controllers and View folder are mapped together.
Views: As I mentions above Controllers and views folder are connected with each other’s most of the time. For every controller there should be a view (95% it’s there some time it’s not necessary) The Views folder contains one folder for each controller.
Home folder content all three files for index, about and contact file same for account folder. There are few other things .The Home folder is used for storing application pages like the home page and the about page.
The Account folder contains pages for registering and logging in to user accounts.
Shared Folder In web forms we used master pages earlier in MVC it called Layout so every single view can access shared folder. The Shared folder is used to store views shared between controllers (master pages and layout pages).
ViewStart.cs.html it’s very simple select the default layout of the pages.
Models: Model objects are the parts of the application that implement the domain logic. Often, model objects also retrieve and store model state in a database. We can also create a separate library for models.
Images: Store images of project.
Filters: Stuff those provides Action Filters for executing filtering logic either before or after an action method is called. You can read ASP.NET MVC 4 Custom Action Filters
Scripts: Collection of all JavaScript’s of projects
Favicon.ico: Same as before
Glabal.asax: Any configurations you have made in your application are registered or de-registered in this file.
Packages.config: It show version numbers of referenced packages along with their .net targets for all project referenced packages
Web.Config: As usual an xml file so does not need compilation. You can also store information like connection strings for your databases.
Conclusion: Friends remember Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ~Martin Golding
Keep Learning and sharing knowledge : @ssdulawat