Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Projects folder structure recommendation [closed]

I'm getting ready to implement a source control system (subversion) but I'm facing some doubts on how to structure my folders.

I use Delphi for all my development and compile the projects from within the IDE.

My current projects folder structure is as follows:

-E:\Work\1. Shared
--Forms (shared forms across all projects)
--Units (shared units/classes across all projects including 3rd party like JCL)

-E:\Work\2. Company Name
--Admin (stuff related with admin work like a license keys generator, Windows CGI to handle order processing automatically, all developed in Delphi)
--Projects
----ProjectA
-----5.x (version 5.x)
------BIN (where all the binaries for this project go)
------Build Manager (where the FinalBuilder project lives)
-------Install (NSIS file that create the setup.exe)
-------Protection (Project files to protect the compiled exe)
-------Update (inf files related with the auto-update)
------Docs (where the readme.txt, license.txt and history.txt that are included in the setup file are)
-------Defects (docs for any testing done by me or others)
-------HTMLHelp (html help for the project)
------R&D (where screenshots, design ideas and other R&D stuff goes to)
------Releases (when building a release with FinalBuilder the setup file created by nsis is placed here)
------Resources (Images and other resources used by this project)
------Source (if a sub-project exists it will compile to BIN since they are all related)
-------SubprojectA
-------SubprojectB
-------SubprojectC
--Sites
--- companywebsite.com (the only one at the moment but if we decide to have individual web sites for products they would all be placed on the Sites folder)

The sign "-" marks directories.

Anyone cares to comment about the current structure or has any suggestions to improve it?

Thanks!

like image 541
smartins Avatar asked Nov 17 '08 19:11

smartins


People also ask

What is the purpose of a project folder structure?

Project management software folders allow you to structure your projects and tasks in a way that allows for easy navigation and management. Folders enable you to group similar projects or tasks based on whichever criteria you choose.

How do project managers organize files?

The best way to launch a new project management folder structure is to start slow. Focus on the files and folders you're working with now, and build from there. A single, top-level folder with the name “Currents Projects” will be more effective than a wide array of niche folders with diverse naming conventions.


1 Answers

Having setup literally hundreds of projects over the years, and having specialized in software configuration management and release engineering, I would recommend that you first focus on how you want to build/release your project(s).

If you only use an IDE to build (compile and package) your project(s), then you might as well just follow the conventions typical for that IDE, plus any "best practices" you may find.

However, I would strongly recommend that you do not build only with an IDE, or even at all. Instead, create an automated build/release script using one or more of the many wonderful open-source tools available. Since you appear to be targeting Windows, I recommend starting with a look at Ant, Ivy, and the appropriate xUnit (jUnit for Java, nUnit for .NET, etc.) for testing.

Once you start down that path, you will find lots of advice regarding project structure, designing your build scripts, testing, etc. Rather than overwhelm you with detailed advice now, I will simply leave you with that suggestion--you will readily find answers to your question there, as well as find a whole lot more questions worth investigating.

Enjoy!

Based on comments, it seems that some detail is needed.

A particular recommendation that I would make is that you separate your codebase into individual subprojects that each produce a single deliverable. The main application (.EXE) should be one, any supporting binaries would each be separate projects, the installer would be a separate project, etc.

Each project produces a single primary deliverable: an .EXE, a .DLL, a .HLP, etc. That deliverable is "published" to a single, shared, local, output directory.

Make a directory tree where the subprojects are peers (no depth or hierarchy, because it does not help), and do NOT let projects "reach" into each other's subtree--each project should be completely independent, with dependencies ONLY on the primary deliverables of the other subprojects, referenced in the shared output directory.

Do NOT create a hierarchy of build scripts that invoke each other, I did and found that it does not add value but does exponentially increase the maintenance effort. Instead, make a continuous integration script that invokes your stand-alone build script, but first does a clean checkout into a temporary directory.

Do NOT commit any deliverables or dependencies into source control--not your build output, not the libraries that you use, etc. Use Ivy against a Maven-like binary repository that you deploy separate from source control, and publish your own deliverables to it for sharing within your organization.

Oh, and don't use Maven--it is too complicated, obfuscates the build process, and therefore is not cost-effective to customize.

I am moving towards SCons, BuildBot, Ant, Ivy, nAnt, etc. based on my target platform.

I have been composing a whitepaper on this topic, which I see may have an audience.

EDIT: Please see my detailed answer to How do you organize your version control repository?

like image 76
Rob Williams Avatar answered Nov 07 '22 17:11

Rob Williams