Currently I am developing a site with about seven partial classes, a few icons, three pages and an App_Themes folder. I was interested to know, is there an industry standard directory structure for anything larger than a small project?
For example, I want to keep the classes in separate folders, the images in separate folders etc. My current directory structure is as follows (not exact, this is from memory):
- (root) contains the codebehind and forms
- /App_Data
- /App_Themes
- /Bin
- /Images
- /Models - I stole the name from MVC. It sounded more appropriate then 'classes'
- /FusionCharts - a flash charting library
I briefly played with MVC, and it looked like a nice directory structure, however, I am using ASP.NET Ajax.
So, I guess the question is, is there a way to make this directory structure more orderly in your own opinion? Please give answers as to why you made your decision also :).
I like to be inspired by Microsoft standards, since we are using a Microsoft technology. Plus a somewhat good standard is better than no standard, especially if you work in a larger team.
App_Code is standard of course, because it has a function in ASP.NET, not just a best practice.
I sort of like the MVC standard project's structure:
The "Content" folder is maybe the key, since it's the lowest common denominator for ASP.NET projects. So if you work with both WebForms and MVC you'll feel at home in all projects, if you know you have your static resources in that folder.
The only "standard" name you are missing for ASP.NET would be App_Code.
Use the convention that makes sense to you and the people that will be maintaining the code. There is no industry standard for this that I've come across in 4+ years of doing ASP.NET development.
I like having a Content folder under which I can put my Css, Js, and Images folders.
I also follow the same structure as mentioned by you. The only additions that I make is have separate folders for scripts,CSS, and resources. As far as I am aware of there is no such industry standard.
Many ASP.Net Web Forms projects will also have a Controls folder for the ASCX controls.
For css styling, we generally use a styles folder, images for image content (sorta an obvious one), js.
You might have a schemas folder, App_Code for ASHX handlers and other types of application code, and a MasterPages folder.
Some auto-created you might see in a Web Forms project are folders are Properties, App_Data, bin, obj, Packages, and TestResults.