As you saw in the beginning of this chapter, Dreamweaver exposes functionality that allows you to use file Check In and Check Out within its framework. The functionality and implementation is simple; you check out a file from Dreamweaver and the program automatically locks it by creating a duplicate of the file name with an LCK extension. This LCK file contains the username and email address of the user who has checked the file out. This way, when someone else defines the same site, the LCK file is read into Dreamweaver and the user is alerted of the file's checked-out status in the Site Management window. Although this process works fine if your organization exclusively uses Dreamweaver, it wouldn't be the ideal solution when working in large, enterprise-level environments where different departments could potentially be using programs other than Dreamweaver. For instance, although the marketing and web development departments could be using Dreamweaver, the engineering group could be using something completely different in Microsoft Visual Studio .NET. Executives and admins could be making simple edits to web pages using Microsoft Word, while network administrators might wind up using FrontPage to edit web-based network documentation and FAQs. You can begin to see that a train wreck is imminent. A company executive might dislike the wording on his/her bio and instruct their admin to edit the page to their liking. With Microsoft Word in hand, the admin could open the page and make edits. Word, not recognizing the LCK file association, would proceed with the modification. Even worse, anyone with access to the web server could easily go into the folder that contains the LCK files and simply delete them. To avoid a scenario such as this, you and your organization might decide to integrate a more robust, enterprise-level source control and versioning software package such as Microsoft Visual SourceSafe. Available for just under $50, SourceSafe is an excellent third-party source control and versioning package that you can easily tie right into Dreamweaver. At its heart, SourceSafe functions much like Dreamweaver in that you can check out, make changes to, and then check in files. Beyond the simplicities of Dreamweaver however, SourceSafe also integrates versioning, so that at any time during development, you can revert back to an older version of the same file, also known as rolling back. Furthermore, SourceSafe uses its own proprietary database (an instance of FoxPro), effectively preventing prying eyes from viewing and making changes to files. On top of these benefits, SourceSafe includes features for comparing code (line by line) for one version of a file to any older checked-in version of the same file. With all this said, it's important to understand SourceSafe's place and its place within your organization. If you're not sure whether or not you need source control, keep the rules outlined in Table 12.1 in mind.
Dreamweaver's integration with SourceSafe is simple. Although you'll still be required to set a local folder path, the remote path is set up to point to your SourceSafe database. NOTE This book isn't intended to cover the installation procedure for SourceSafe. It's important to note however, that you'll need to install the standalone database on the computer that will host the SourceSafe database (the remote computer). The computer you will use to connect Dreamweaver and SourceSafe to (your local computer) needs the SourceSafe's client tools installed. To configure Dreamweaver to work with SourceSafe, start out by configuring SourceSafe on the server. You can do this by following these steps:
With that done, the files are removed from the file system and stored exclusively in SourceSafe. Before we move back to the local development machine and start configuring Dreamweaver to use SourceSafe, make a note of the SourceSafe database path. The default path, C:\Program Files\Microsoft Visual Studio\VSS\srcsafe.ini, is used when defining the site in Dreamweaver. Now let's configure Dreamweaver. You can do this by following these steps:
Now expand the Files panel by clicking the Expand/Collapse icon to launch the Site Management window. With the window open, click the Connect icon to open the SourceSafe database in the Remote pane, similar to Figure 12.23. Figure 12.23. The SourceSafe database opens in the Remote Site pane.NOTE SourceSafe client tools are required on the client running Dreamweaver. What this means is that to use the SourceSafe integration built into Dreamweaver, you'll still have to install the client tools available on installation disk. Now you can right-click files and select the Check Out option to check out files exclusively to you. |