Solved

C# Directory Structure and File Organization

Posted on 2007-12-05
6
3,537 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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

12 Experts available now in Live!

Get 1:1 Help Now