Solved

C# Directory Structure and File Organization

Posted on 2007-12-05
6
3,530 Views
Last Modified: 2013-12-16
I know this question is probably a waste of a lot of peoples time but being that I am very anal retentive I cannot let it go. Pretty much on a day to day basis I wrestle around with different ideas about how I want my folders and files to look for my C# and .NET projects. I cannot decide and was hoping someone out there could finally give me some peace.

This is what I have right now, its two seperate structures but I cannot decide on what to use:

ASP Web Forms

./
-  /Clients
-- /Client Name
---   /Backups
---   /Documents
---   /Visual Studio
----    /WebApps
-----      /sitename.com
----    /Library
-----     /SiteClassLibrary

Or this is what I started using for my winforms and console applications

./
- /project name
--  /src
---    /bin
---    /debug
--  /lib
---   /dll

Any thoughts? I just can't help it, stuff like this honestly makes me lose sleep at night. I just want to have it as organized as possible

Thanks in advance for any help, I appreciate it.
0
Comment
Question by:JoeDW
  • 3
  • 3
6 Comments
 
LVL 19

Expert Comment

by:SteveH_UK
ID: 20417806
I think you should organise it as follows:

1.  Use the 4-tier model of Client, Contract, Solution, Project
2.  If you are creating generic code, substitute your company for Client
3.  Create backups of work at the Contract level
4.  Store Client-centric documents at the Client level
5.  Store Contract-centric documents at the Contract level
6.  Use version control systems (such as CVS or Visual SourceSafe) for the Solutions and Projects
0
 
LVL 19

Expert Comment

by:SteveH_UK
ID: 20417815
How you organise a development machine does not need to be identical to how you organise it from a medium-to-long-term perspective.  Often these environments are different.

And of course, it is always a matter of choice.  The advantages of the above are:

1.  Clients and individual contracts can be archived when work is complete, without affecting other projects
2.  Individual contracts can support multiple VS solutions and multiple projects per VS solution
3.  There is an appropriate place to store documents for both client and contract
4.  Code development is protected by version control
5.  You can reuse code as necessary by project imports, but you should not be linking code between clients, and this model supports that view.  It enables generic code to be compiled into separate solutions and projects that can then be referred to by other projects as needed, as well.
0
 
LVL 1

Author Comment

by:JoeDW
ID: 20421542
SteveH,

That sounds great, the first answer is what I am looking for. But what would Contract mean or what would it be in the folder structure?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:JoeDW
ID: 20421550
Or is it the client name or company name?
0
 
LVL 19

Accepted Solution

by:
SteveH_UK earned 250 total points
ID: 20421901
When you begin a piece of work for a company, you should establish a specification for that work and agree it.  That piece of work is a contract.  Later, that same company may ask for additional work to be done.  Those jobs are a new contract.

Following that way, you might get something like this:

Company 1 -> Contract 1 : New Corporate Website : Website Solution
Company 1 -> Contract 1 : New Corporate Website : Syndication Web Services (for RSS, etc.)
Company 1 -> Contract 2 : New Intranet : Website Solution
Company 2 -> Contract 1 : MyBrand Website : Website Solution
Company 3 -> Contract 1 : Timesheet software system : WinForms Solution

0
 
LVL 1

Author Closing Comment

by:JoeDW
ID: 31413072
Wonderful, thank you for your help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now