Tuesday, 21 December 2010

Team Foundation Server 2010 (2)

I've spent the majority of the day trying to teach myself how to set the server up and how it works with Visual Studio 2010. Fortunately it's all pretty intuitive and I think I have it figured out to a level where the team can make use of it. It is going to save us a lot of time and make us work better.

There were a few different topics that I looked at. I followed Jason Zander's tutorial on his blog and that taught me how to do the install, create a project in TFS and then add code to it from VS2010 and make changes. What this doesn't go into is two slightly more advanced topics - using the Source Control Explorer and Branching. It also skips over Workspaces (basically the 'Set Working Directory' option that was in Visual Source Safe).

Branching allows you to create multiple copies of the same application and keep them in different states simultaneously. The simple example I saw on Codeplex has a three Branches - Main, Dev and Release. The Dev Branch allows the dev team to work on one copy of the application while the Main and Release Branches are kept 'clean'. When the dev team has completed something and tested it the changes can be merged into Main and Release, built and published. Another benefit of this is that if something urgently needs doing to the Release version you can implement the change on Release and propagate the change back down to Main and Dev. This seems like a really powerful tool.

The Source Control Explorer is what manages these Branches. Once you have created the Main Branch you can populate it with a blank solution from VS2010 and then Merge this into the other Branches. I guess there's maybe room for a Test Branch too.

Creating a Build is really easy (once you figure out how to give the correct permissions to write to the build folder on the server) and it drops out a compiled web app which you can quickly drop onto a server. You can specify builds for the different Branches and schedule these to run multiple times throughout the day. I guess the dev build needs to happen pretty frequently, the release build could be run manually to save the server overhead.

The irritations caused by Source Safe are pretty much gone. Tomorrow I'm going to install VS2010 on another development laptop and see how easy / difficult it is to get a copy of the source code and make changes to it.

No comments: