Microsoft Visual SourceSafe 5.0

Microsoft's Visual SourceSafe gives Web masters who use other Microsoft development software several Web tools, such as Deploy, Check Hyperlinks, and Site Map, for managing their Web sites.

T.J. Harty

March 31, 1997

6 Min Read
ITPro Today logo

Useful tools for Web projects

I never thought I'd be interested in using Microsoft's VisualSourceSafe in my Web environment until I read everything version 5.0 can do.Visual SourceSafe has a long list of features and controls. I knew I had to takea closer look when I saw that it provides some useful tools for my Web projectssuch as document protection through project-oriented version control. But beforeI dive into these tools, let's examine what you need to set up and run VisualSourceSafe.

The Set Up
Although Visual SourceSafe lets you work with any type of file or softwarepackage, Microsoft has integrated Visual SourceSafe into many of its developerpackages such as Visual Basic (VB), Visual C++ (VC++), Visual J++ (VJ++), VisualFoxPro, FrontPage, and Access. To use Visual SourceSafe, you need to install iton a network server (I installed Visual SourceSafe on my development machine, anIntergraph InterServe Web300, where I keep a copy of the complete WindowsNT Magazine Web site). After you install Visual SourceSafe, you'll want toset a password for the Administrator (Admin) and set the appropriate permissionsfor this account. Then, unless you plan to work as the Administrator, you needto add your name to the database user list with the Visual SourceSafeAdministrator. Screen 1 shows the Visual SourceSafe Administrator with adatabase user list of three users. Next, you use netsetup.exe from the server'sVisual SourceSafe win32 directory so you can set up the Visual SourceSafeExplorer on your workstation and access the server's database where all thefiles are stored. This approach is easier and faster than installing the VisualSourceSafe client portion from the CD-ROM because Visual SourceSafe createspointers back to the central database on the server. The next step is to set theappropriate user permissions so that you and anyone on your team can work onyour soon-to-be created projects.

Setting Permissions
Visual SourceSafe has two levels of security--default security and projectsecurity. Default security has two levels of permissions--read-write andread-only. When you create new users, their default permissions are read-write(i.e., the new users have full access rights: Read, Add, Check Out, andDestroy). However, you can separate these four rights into the following fourlevels of permissions by using Project Security:

1. Read: users can view files but they can't modify them.

2. Add: Read, Check Out, and Add access rights--users can see and modifythe files and add and remove files in a project.

3. Check Out: Read and Check Out access rights--users can see and modifyexisting project files.

4. Destroy: Read, Check Out, Add, and Destroy access rights--users haveunlimited rights in the project, including the right to perform irreversiblecommands such as Destroy, Purge, and Rollback.

By clicking the Project Security Options tab, you set each user'spermissions for each project (just be aware that setting individual projectpermissions can be a headache to administer). So, for example, I can give fullaccess to users in charge of the Windows NT Magazine ProfessionalsConference areas on our Web site for their project and still maintain controlover other projects. You can also set this level of permissions with NT, but NTdoesn't have Visual SourceSafe's version control and rollback capabilities.

In addition to the four levels of permissions for a standard user,the Administrator has an additional level of permission. When a user checks outa file from Visual SourceSafe and changes it, the Administrator can reversethose changes. The Administrator, whose username you can't change, is also theonly user who can run Visual SourceSafe Administrator and modify the user list.Now that you understand permissions, let's learn what it takes to work on aproject.

Working on a Web Project
To begin working on a Web project with Visual SourceSafe, you need to createa project. From within Visual SourceSafe Explorer, click Create Project and namethe project in the box provided.

After you create the project, you need to add some files to work with. Youcan add files by highlighting your project, clicking Add Files, and browsingyour way to the directory or directories you want to include. You can thenselect files or directories to add. The Add Files box stays open until you closeit in case you want to add more files or directories to your project. You canalso open Visual SourceSafe Explorer and NT Explorer and drag folders or filesto Visual SourceSafe.

All my projects are Web projects. To take advantage of Visual SourceSafe'stools for Web projects (such as Deploy, Check Hyperlinks, and Site MapCreation), you have to designate your projects as Web projects in the VisualSourceSafe Administrator by clicking the Web Projects tab, which you see inScreen 1. You can work in SourceSafe Administrator remotely, but it can beslow--even over an Integrated Services Digital Network (ISDN) line.

Visual SourceSafe stores all project files as read-only to protect themfrom unwanted changes. To edit a stored file, you have to check it out. Youcheck out files by starting the Visual SourceSafe Explorer client, which issimilar in appearance to the NT Explorer. From the Explorer, you can see all theprojects on the Visual SourceSafe server under version control. Find the filesor directories you want and check them out. Visual SourceSafe places copies ofthe files in any directory you declare as your working directory. After youfinish with the files, you just check them back in. The beauty of VisualSourceSafe is that it uses its History services to record all the changes to anyfiles under its protection. The History service records changes to a file fromthe time it was initially added to Visual SourceSafe. With the file history, youcan revert a file to any point in that file's history and recover the file as itexisted at that point.

In addition to reverting a file to a previous version, you can use the ShowDifferences command to compare the differences between a file in your workspaceand a file you've stored in Visual SourceSafe. You can even compare versions ofthe same file you've stored in Visual SourceSafe. After Visual SourceSafecompares the two files, it uses split panes to display the context of both fileson your screen, as you see in Screen 2. Visual SourceSafe highlights changedlines between the two files, so you can easily find the differences. All youhave to do is right-click the file you want to compare and select ShowDifferences to begin the comparison.

Web-Specific Tools
Visual SourceSafe 5.0's extra features for Web projects are Deploy, CheckHyperlinks, and Site Map Creation. The Deploy option lets you deploy a set ofWeb files to a Web server or multiple Web servers. The only drawback is that youmust deploy an entire project--you can't deploy individual files. To deploy aproject, you need access to the Destroy permission because the Deploy commandoverwrites all duplicate files with new ones.

With the Check Hyperlinks option, you can have Visual SourceSafe test allthe links in the files in your workspace or the files in the Visual SourceSafeserver's project. After Visual SourceSafe checks the links, it shows you adialog box with three list boxes. The top box lists all the files polled, themiddle box lists the links that appear to be invalid from the top box, and thebottom box lists the links that Visual SourceSafe didn't check because they wereoutside the project.

The Site Map Creation is handy for creating a map of your Web site, or atleast a map of a project, if that's what you select to create. Whether you haveseveral people who work on the same group of files or you want an extra level offile protection at any cost, I recommend you look at Visual SourceSafe--it'seasy to install and use.

Microsoft Visual SourceSafe 5.0

Microsoft * 206-882-8080Web: http://www.microsoft.com/ssafePrice: $499

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like