views:

2033

answers:

8

I have been experimenting with directory structures and am currently using the one below:

 |
 |_projects__
 |           |
 |           |_blog.com_
 |           |          |_mockups
 |           |          |_user stories
 |           |          |_....
 |           |
 |           |_noteapp__
 |                      |_mockups
 |                      |_....
 |
 |_webs______
 |           |
 |           |_dev______
 |           |          |_blog.com_
 |           |                     |_app
 |           |                     |_config
 |           |                     |_....
 |           |
 |           |_prod_____
 |           |          |_blog.com_
 |           |                     |_app
 |           |                     |_....
 |           |_qe_....
 |           |_uat_....
 |
 |
 |_desktops__
             |
             |_dev______
             |          |_noteapp_
             |                    |_app
             |                    |_config
             |                    |_....
             |
             |_prod...
             |_qe....
             |_uat....

                                                 KEY
                                                 dev  - development
                                                 prod - production
                                                 qe   - quality engineering
                                                 uat  - user acceptance testing

Webs store web applications, desktops store desktop applications. The dev directory is version controlled, while the other directories (prod, qe, uat) store their respective current releases. The project directory stores non-code related project items.

What is your software development directory structure and is there a reason you recommend that structure?

+4  A: 

I'm a big fan of your more granular leaves, but at the top level I perform much better having the filesystem organized by project. I'm much more likely to be in a code directory and think, "Hey, what was the spec for this?" than be in the spec directory and think, "Which project did I want the spec for?" To rearrange your diagram:

|
|___webs____
|           |
|           |_blog.com_
|           |          |
|           |          |_docs_
|           |          |      |
|           |          |      |_mockups
|           |          |      |_user stories
|           |          |      |_...
|           |          |
|           |          |_code_
|           |          |      |
|           |          |      |_dev_
|           |          |      |     |
|           |          |      |     |_app
|           |          |      |     |_cfg
|           |          |      |     |_...
|           |          |      |
|           |          |      |_prod_ 
|           |          |      |_qa_
|           |          |      |_uat_
|           |
|           |_blah.com_
|           |          |
|           |          |_...
|
|_desktop___
|           |
|           |_noteapp__
|           |          |
|           |          |_...
|           |_...


                                                KEY
                                                dev  - development
                                                prod - production
                                                qe   - quality engineering
                                                uat  - user acceptance testing

That said, the organization at my office follows your methods, and seems to support a largish development environment. Personally, I find it really frustrating to have to search for mockups and other cases in directories other than the one my project is in (specifically, as an analyst, having specs separate from Marketing models, but I digress), but from a process-delegation standpoint separating these concepts probably makes a good deal of sense.

Just my two cents.

kyle
I usually go with something like this as well; this way, old/dead projects don't get in my way and are clearly separated off in their own "namespaces"...
Reuben
+3  A: 

I store everything in a "c:\projects" directory on my windows machine and ~/projects on our unix-oid (linux & solaris) environments. Below that I have a "learning" (for code experiments and snippets /directory) and then one directory for each project. After some time, when a project is defunct, I erase the local storage and the code is archived only in SVN.

lexu
+5  A: 

I do the following:

  • Projects
    • Project 1
      • Design
      • Docs
      • Code
    • Project n
      • Design
      • Docs
      • Code
    • Not active
      • Project 1
        • Design
        • Docs
        • Code
      • Project n
        • Design
        • Docs
        • Code

For some reason it helps me a lot to keep all the files grouped up by project, and keep my inactive projects (the ones I'm not currently working on) on a further down folder. I guess I get distracted by them otherwise.

Dave
+1: I use the same structure (after extensive experimentation)
Stefano Borini
What guidelines do you use to determine what you put in the Design folder versus the Docs folder?
Matthew Rankin
Well, I try to collect every design aspect of the project on the "desgin" folder, for example, Photoshop layouts, logos, images, etc.As for the "docs" folder, I store everything related to documentation or client created documents in there.
Dave
A: 

I tend to prefer flatter directory structure and would like to recommend keeping it as simple as possible. Remember that, at least in Windowsland, there is a limit on command line length. Thus having very deep structures might spawn some nasty build errors.

Ignas Limanauskas
A: 

I just use a shorthanded name for each project and toss all relevant files and directories into that one directory. Something like this:

  • project_name (Project Name, "shorthanded")
    • dir1/ (Not named like this in reality.)
    • dir2/
    • dirN/
    • file1
    • file2
    • file3
    • fileN
hydrapheetz
A: 

Files in svn:

SomeLibraryX
  SomeLibraryX.sln
  SomeFunctionA.cs
  SomeFunctionB.cs
  ..

SomeApplicationY
  SomeApplicationY.sln
  SomeApplicationY.cs          <-- might use SomeLibraryX as one of the dependencies

SomeApplicationZ
..

Files in some shared \\intra-pc\Releases\

SomeApplicationY 1         <-- folder used to execute compiled binary. Contains all the necessary input files needed for execution.
  Model                    <-- all input files like xml:s and 3ds:s 
  Textures                 <-- all pictures 
  Depencies                <-- all dependency executables and dlls
  SomeApplicationY.exe     <-- main exe
  SomeApplicationY.ini     <-- execution parameters file, that can be drag&dropped onto main exe

SomeApplicationY 2
  Model 
  Textures
  Depencies
  SomeApplicationY.exe
  SomeApplicationY.ini

SomeApplicationY 3            <-- the last demo-release of this project that is currently under construction (used for executing and debugging the exe)

  Model 
  Textures
  Depencies
  SomeApplicationY.exe
  SomeApplicationY.ini

SomeApplicationZ 1
...
AareP
+1  A: 
  • src\ <- Source codes for multiple projects (below)

  • tests\

    • test_a <- module test for a for r&d (uses some of codes from src folder)

    • test_b <- module test for b for r&d (uses some of codes from src folder)

    • ...
  • main_app_folder <- Main project file for production (uses most of codes from src folder)

  • doc\ <- Documents

  • tools\

    • tool_a <- tool a (uses some of codes from src folder)

    • tool_b <- tool b (uses some of codes from src folder)

  • cleanup.exe / .ini <- utility for cleaning up temporary build files.

Project (in main_app_folder, tests or tools) can be .vcproj (visual studio c/c++), .mmp (Symbian makefile), Makefile (linux makefile). Each project has it's own main .cpp file - always containing a minimal set of functionality, everything else tends to be more or less reusable (in src\ folder).

Difference between test application and tool application is that tool display something more or less useful, while test only checks whether it works or not.

Difference between test and main application is that test application does not contain whole functionality, also test application might enable some special #define's needed for testing. Normally testing application is reduced set of main application without extra #define.

A: 

I usually use this directory structure:

  • proj_name
    • code
      • src
      • test
      • build
    • design
    • doc
    • tools
alem0lars