Code Sharing in Team Foundation Server

How do you share code in Team Foundation Server?  That's what our team is working through at the moment.  We're looking at what's working, what's not working, and what should customers be doing.

Here's how we're basically thinking about it so far:

  • There's two main code sharing paths: source and binary.
  • Within source code sharing, there's two approaches:  workspace mapping on the client and branching on the server.
  • The key issues are how to deal with parallel development and how to share across projects

Here's what seems to be our emerging guidance:

  • If you're coding in parallel, and you need real-time updates, start with workspace mapping.
  • If you need periodic snapshots, or if you need isolation from the changes, then consider a branching approach.
  • If the source you need to reference is relatively stable, then consider using the binary.

The problem with workspace mappings is that they're developer specific.  Each developer will need their own mapping.  You'll also need to lock down permissions to avoid accidental changes.  Branching has the advantage that you can be explicit about taking changes, so you have stable builds but with the overhead of merging.  You can branch within the same project or cross-project.  A separate project might make sense if you have multiple projects consuming the code.

I need to still look across more customer sets, but so far I mostly see binary reuse.

I'm particularly curious in any lessons or insights those of you would like to share.  I think this is an important area for effective source control practices.