Source Control Video Highlights

  • Shared access provided by file locks
  • Comparing multiple versions of a file
  • Enabling connectivity to other source control systems through MSSCCI
  • Checking out and checking in files
  • Enabling rollback to a previous version

Evaluate Visual Studio

Introduction

With so much time invested in the average software project, it is important to protect that investment. Source Code is important to any development project because it preserves all software development work done by a team. Neither Visual Studio 2005 or Dreamweaver 8 contain source code repositories. Both products have integration features with popular source code applications. Source control systems vary in the degree and manner in how they protect the code. They will typically have some type of roll-back feature. They will also typically have a feature that will let you know when someone else has checked out a file. In this video, we examine source code control integration in Dreamweaver Version 8 and Visual Studio 2005.

Dreamweaver Section

Dreamweaver includes a simple provision for source control right in the product. As well it can connect with other free and paid solutions to provide source control. First we will examine the free solution integrated right in with the product, which does not provide rollback capability, but simply locks shared files so that only one person can make changes at any time. From the Site menu, select "Manage Sites". After picking a site from the list, use the Edit button. From there, choose "Remote Info" at the left of the panel. By default the Access is set to None, but in the drop-down list there are several options that you can use. RDS in the list stands for "Remote Development Service," and is used with the ColdFusion server technology. In this case we will select "Local / Network". With the checkbox configured to enable check in and check out, from the File panel Dreamweaver then lets you check out each individual file that you are working on. When a file is checked out, it is marked as being in-use by a specific person. If someone else has a file checked out, it will be marked with a red checkmark. You can easily see who has the file checked out. This aids collaboration by insuring that changes will not conflict with work being done on the same files by other members of the same team. This check-out information is held in a special "lock" file with an .LCK extension. Dreamweaver does not make checked-out files read-only on the remote server. Files transferred with an application other than Dreamweaver can be overwritten. In this case, there will be an LCK file visible next to the checked-out file hierarchy to help prevent such accidents.

Dreamweaver also supports third-party source control solutions. Dreamweaver can be configured to use Source Safe by referencing the "Manage Sites" option from the "Sites" menu. From here, choose a specific site, and then on the "Remote Info" selection, choose "Microsoft Visual Source Safe" in the Access drop-down. Connection details can be chosen from the "Settings" button. With these tools you can compare the code of local and remote versions of the same file, roll back changes to the files, and much more. Comparing local and remote versions is useful if you’re working on a file locally, and you suspect that the copy of the file on the server has been modified by somebody else. Without exiting Dreamweaver, you can view and merge the remote changes into your local version, before putting the file back out to the server. The check in and check out features inherent in Dreamweaver do not provide any kind of versioning or rollback capability, so the built-in capability is by no means a full source control solution.

Visual Studio 2005 Section

Visual Studio 2005 has a very flexible interface for source code control called the Microsoft Source Code Control Interface, or MSSCCI. With this you can connect to dozens of different source control providers available on the market. These tools can check files in and out of source control, merge files, view file history, and accomplish other source code control tasks. Similar to Dreamweaver, if you have Microsoft Visual SourceSafe installed, (also known as VSS), you can perform source control tasks of check in and check out directly in Visual Studio 2005. For larger projects, Visual Studio is designed to work with the Team Foundation Server, which provides more extensive options for Source Control. This type of source code control solution caters to the type of development done in a team environment. There are three versions of Visual Studio that leverage Team Foundation Server: one for Architects, one for Developers, and finally one for testers. Other source control providers can integrate with Visual Studio 2005 if they adhere to the MSSCCI standard.

The exact behavior of source code control depends on what source code control system you are using. All source code control systems support the base commands that are required to perform check in and check out, as well as other tasks. For some functions, such as merging files, Visual Studio 2005 brings up the source code control provider's own user interface, which can vary from one provider to another. As long as Visual Studio 2005 is configured to use a compatible source code control provider, source code control commands in Visual Studio 2005 are automatically enabled. You can enable source code control functionality in Visual Studio 2005 from the Tools menu, under Options / Source Control. When you want to edit a file, you can check out the file from the source control system. Checking out a file puts a writeable copy of it on your computer. When you are done editing, you check the file back into the source code control system, which then changes the file on your local system back to read-only.

Visual Studio 2005 also allows you to check files out explicitly or implicitly. Explicit checkout means that you select the files to work with and issue an explicit command to check them out using the source control mechanism. Implicit checkout means that you simply open a file in Visual Studio 2005. If the file has not been checked out, it is in read-only mode. As soon as you try to make a change to the file, Visual Studio 2005 checks out the file so that you can save your changes. By default, Visual Studio 2005 does not prompt you before checking out a file. You can enable these prompts in the Tools menu, under Options / Source Control / Environment. With the drop down lists, you have the option to set the default settings for both "On Save" and "On Edit."

Visual Studio 2005 can also be configured so that it does not perform implicit checkouts. By doing this, you cause files to be opened in Read-only mode. Now, if you want to be able to save changes, you must first explicitly check out the file. Most source code control systems, including Visual Studio Team System, will allow multiple developers to check out the same file simultaneously, leading to overlapping edits. When a file is checked in, the source code control system determines whether the file has been changed by someone else since you checked it out. If the file has not changed, it is checked in as usual. However, if the file has changed since you checked out your version, the source code control system attempts to merge your changes with the changes it finds in the file.

Conclusion

This concludes our video comparison of Dreamweaver 8 and Visual Studio 2005 on the topic of "Source Code Control Integration."