Best Practices: Using the Tools
In November of 1994, Microsoft purchased One Tree Software, which created SourceSafe, the "project-oriented version control system." SourceSafe was an interesting product before the purchase; now that Microsoft plans its first major release of the product to include features specially designed to support Visual Basic, it's even more important for Visual Basic developers to become familiar with the product. In this section, we'll provide a quick tour of SourceSafe, with an eye toward how to use it for Visual Basic projects.
Here are some of the product's features of special interest to Visual Basic project teams:
- Each Visual Basic project corresponds to a SourceSafe project. To create a SourceSafe project, you need to add to it all the files that make up your Visual Basic project — with the exception of VBX files.
- SourceSafe is based on a modified check-in/check-out model. In SourceSafe terms, you Get all of the project files — this allows you to compile, run and test. But you Checkout only the files you need to make changes to — this allows you to exclusively change files, after which you can Update those changes back into the SourceSafe project so other team members can see your changes.
- SourceSafe stores changes made to files, rather than the complete file. As long as you save your Visual Basic forms as text, you can see, line by line, the changes made to a form (or .BAS or other files), and merge disparate sets of changes. So even if you and another developer make simultaneous changes to a file you both forgot to Checkout, you can still reconcile these changes.
- One of the most powerful features of SourceSafe is its support for common files, which can be shared across projects. The SourceSafe Share command does this, and will propagate any changes made to these common files (e.g., .BAS files) across all of the projects they're Shared to.
- Better still, you can use the Links command to generate a list of all projects that Share a particular .BAS file. This will be helpful in determining which projects need recompiling after a change to common code, for example.