Wednesday, February 6, 2008

Project Structure (re-revisited)

In the past few weeks, I've been researching what is the best structure for a project.

I found these aproaches:
  • SubVersion
    • /myproject
      • /trunk
      • /tags
      • /branches

Your development is done in “trunk”. When you want to do a release, you create a branch, for example “myproject/branches/release2.0”.
The development is still done in “trunk”. In “branches”, you only do maintenance.
If you want to label a particular development stage, you create a tag: “myproject/tags/RTM”
An advantage of SVN is that it stores only the deltas, so you don’t have everything replicated.

  • Microsoft Team Foundation Server
    • /MyTeamProject1
      • /Development
        • /FeatureBranch1
          • /Source
            • /MyApp
        • /FeatureBranch2
          • /Source
            • /MyApp
    • /Main -Can contain solution (.sln) files
      • /Source
        • /MyApp1 - Contains MyApp1.sln file
          • /Source - Contain folder for all source
            • /ClassLibrary1 - Contains ClassLibrary1.csproj
            • /MyApp1Web - Contains Default.aspx
          • /UnitTests - Container folder for unit tests
            • /ClassLibrary1Tests - Contains test project and code
            • /MyApp1WebTests - Contains test project and code
        • /SharedBinaries - Shared binaries e.g. libraries
        • /SharedSource - Shared source code
      • /Docs - Contains product documentation
      • /Tests - Container for tests
        • /FunctionalTests
        • /PerformanceTests
        • /SecurityTests
    • /Releases
      • /Release1 – Maintenance
        • /Source
          • /MyApp
      • /Release2 – Maintenance
        • /Source
          • /MyApp
      • /Release3 – Current release lockdown
        • /Source
          • /MyApp

I think this was inspired by SVN. All your development is done in “Main”. When you want a release, you branch it to “Releases”.
If you want to develop a special feature, or test another approach to your code, you branch it to “Development”, but your main development branch is in “Main”.

  • Tree Surgeon
    • /TestProject
      • /lib
      • /src
        • /Core
        • /TestProjectConsole
        • /UnitTests
      • /tools
        • /nant
        • /NCover
        • /nunit

This is an approach started long time ago. It doesn’t account for project releases, or other branches.

I think I’ll adopt TFS. But using VSS:
  • $MyTeamProject
    • /Development
      • /TestingIdea1
        • /Source
          • /MyApp
      • /TestingIdea2
        • /Source
          • /MyApp
    • /Main
      • /Source
        • /MyApp
          • /Source
            • /ClassLibrary1
            • /ClassLibrary2
            • /ClassLibrary1Tests
            • /ClassLibrary2Tests
        • /SharedBinaries
        • /SharedSource
      • /Docs
      • /Tests
        • /FunctionalTests
        • /PerformanceTests
        • /SecurityTests
    • /Releases
      • /Release1 – Maintenance
        • /Source
          • /MyApp
      • /Release2 – Maintenance
        • /Source
          • /MyApp
      • /Release3 – Current
        • /Source
          • /MyApp

The problem is that everything is replicated when you do a branch… oh well, as they say, hard-disks are cheap…

I’m still trying to get CI Factory to work. More of that in another post…



PS: This is a re-repost. Only ScribFire didn't messed the layout... and mine doesn't have the option the remove this irritating line...
PS2: Broken again... ARGGGHHHHH

Powered by ScribeFire.

No comments: