Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2005, 03:04 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 463
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to madhukp
Default Folder structure for ASP.Net projects

Dear friends,

In many of the sample ASP.Net projects, I am seeing a folder structure with

1) all model classes in Components folder

2) all user controls in UserControls folder

3) All javascripts in JS folder

etc. etc. I think this is the standard folder structure suggested by Microsoft.

But, I prefer a folder structure that is dependant on project modules. Since I am using UML to model projects, I have a list of entities and methods connected to entities. I prefer to have one folder for each entity and put all JS files, User controls, Model class, custom controls (specific to that entity) in the single folder. I find this to be more scalable and developer friendly as there are only few files in a folder. Also, I can assign folder level access to developers.

For e.g. let Students, courses and subjects be 3 entities in a University mgmt. software. In my project, there will be 3 folders namely Student, Course and subject. All class files, aspx files, JS files and controller files associated with Student entity is put in Student folder alone.

In the first folder structure I mentioned, class files, aspx files, user controls etc. associated with one entity is scattered in many folders. That method is also not scalable. When the project expands to include 500 entities, There will be atleast 500 class files in Components folder (which is cumbersome to work with).

I have not seen any project following my folder structure. So, I become dubious about its advantages / disadvantages. May I know whether there are any disadvantages for my folder structure ? Why most of the people are following the first folder structure I mentioned ?
 
Old August 8th, 2005, 09:23 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you get to the point that you have 500 entities in a project, then it's time to think about breaking the project up into other projects. Subdivide the project into logic groupings of code (business logic; database logic; UI elements). This is a better approach to just dividing up the code peices into folders within the same project.

Your approach may seem logical when you have single bits and pieces that work in small logic units (A student, A course, A subject). But in reality, all the elements will have to play together in code. A Course may have a collection of students in it. A Student may have a collection of Courses they are taking. So is there really anything gained by breaking up your project structure by these types of entities?

In our setup we have 13 class libraries in the primary application solution. 1 is a web application which serves as the front end to the entire application. The other 12 class libraries are divided up into such things as: Constants/enumerators; business entities; data access; business logic (several for different areas of the application); helpers (tools and such); custom controls. The web application project is divided into directories to separate logic areas of the application. It becomes quite difficult to manage a large web application if every file lives at the root. But a significant portion of the support codebase is found in completely other project assemblies where the various classes live together.

Sometimes accessive organization can be a bad thing.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to create ASP.NET projects manisha2578 VS.NET 2002/2003 1 June 21st, 2005 08:02 AM
Still confused Folder structure eureka BOOK: ASP.NET Website Programming Problem-Design-Solution 5 September 14th, 2004 11:37 PM
Namespace vs. Folder Structure (Help Englere) groupmatch BOOK: ASP.NET Website Programming Problem-Design-Solution 14 September 8th, 2004 08:05 AM
C# folder and project structure organicglenn BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 7th, 2004 09:47 PM
thePhile (VB) file folder structure... jaspe BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 1st, 2004 08:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.