Solved

C# Directory Structure and File Organization

Posted on 2007-12-05
6
3,539 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

861 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