Valerie Whitcomb
Microsoft Corporation
September 1998
Summary: Illustrates how to work in Microsoft® Visual InterDev™ local mode to work on a Web project in isolation from the live Web application. Includes workflow suggestions for using local mode and requirements for your local machine. (6 printed pages)
Would you like to work on your Web pages in isolation from the live Web application other people are viewing on the Web server? Instead of maintaining separate test Web applications, you can use a project in local mode to work on the same Web application your team is working on or your users are using.
If you find yourself balking at the seeming complexity of "local mode," don't worry. Just remember that your Web project in Visual InterDev refers to two sets of Web files, and with local mode you can control when updates become "public."
The following tips for using local mode effectively also include a brief comparison of master and local mode. This article covers the following topics:
Useful Concepts for Understanding Project Modes
The terms "local" and "master" identify sets of files that make up your Web application as well as identify the system components that process the Web pages. The term "local" refers to the files or components that interact in isolation from the team server during local mode. They are located in the project directory. The term "master" refers to the files or components that are available on the team server to everyone for changing or viewing. For example, the team Web server is called the master Web server and it holds the master Web files.
When you create a project, a local directory is created that holds the local versions of the Web files. Your developer workstation can have a local Web server installed that is not used by the team. In local mode, your local Web server provides all of the Web services for your Web application instead of the master Web server.
While working in local mode, new files that you add to the project are added only to the local directory and are called personal files. Once you are ready to make them available on the master Web server, you will use the Add to Master Web command.
Note The option to work offline can be used with either project mode. However, when working offline you do not have any connection with the master server and, therefore, need local copies of everything you want to use to include your data. You can only refresh your view of the project with master files after going back online.
When working in local mode, certain commands operate only on the files in the local directory. Their actions are reflected on the Web server only when you explicitly choose commands that interact with the Web server.
For example, the Save command updates the local copy of the file, but in order to update the master copy, you need to use the command Release Working Copy (or Check In, if you are using Microsoft Visual SourceSafe™). Because you are saving only local copies, your changes do not affect the Web server version and the versions worked on by other team members. Likewise, your team members can put their projects in local mode and make changes without affecting others using the master Web server.
Note Regardless of the mode that your project is using, you can also work offline. Offline for a Web project means that you work as if you have no connection to a network or to any Web server other than the local one.
Note If you open and save files without going through a project, the project is unable to manage the state of the file and may generate errors.
If changes are saved to the master after you have gotten your working copy or checked out the file, you are provided options for handling the differences. One of the options is to merge the files. In most respects, this functionality works exactly the same as Visual SourceSafe because it uses the same interface. This merge capability is available whether or not you have Visual SourceSafe installed.
While the project does warn you about overwriting current master copies and assists with resolving conflicts, it does not save a history or past versions. By itself a project does not have the source control database necessary to provide those features.
However, some project-level commands, such as moving files and removing files, require immediate action on the master application as well. For example, if you try to move or delete a write-enabled copy, you are prompted to check it in or release it before doing the move or delete. Once you have released the copy, you can perform the action and the changes are made directly to the master set of Web files even though your project is in local mode. Likewise, if the automatic link-fixup property is set for your project, links in the master files may be updated when the links are fixed automatically. Also, the Web tools, Link View and Site Designer, work directly on the master copies regardless of your project mode.
If your master Web server is on a separate machine from your workstation, your workstation needs to have all of the services your Web application needs. So the question you need to consider is, "Which services or additional applications does my Web application require?"
Note Your operating system affects which Web server is installed on your machine but does not affect how you work in local mode. If you are using Microsoft Windows® 95/98, the installation wizard installs Personal Web Server instead of Internet Information Server.
You do not need to use the following table if your workstation is also the team Web server, because it should already have the services you need for your project in local mode.
If your application uses | You need |
HTML and client script in HTM pages | A Web browser and a local copy of the pages you are testing. |
Links to other pages | A local copy of the file, for destination pages within your current project. (For pages outside your project, the URL should resolve regardless of the project mode.) |
Server script in ASP pages | A Web server installed on your workstation. |
COM objects | The "Register on client" option enabled for the object in the project. |
Data | Nothing additional if your workstation is using the same local area network (LAN) as your database server. However, if you are working offline, using dial-up access, or working through a firewall, you need a local copy of your data and to set your connections to use it. |
Microsoft Transaction Server | Remote Machine Debugging, an application provided by the Microsoft BackOffice® Server wizard. Although the debugging components have already been set up by the VID client, this application registers some registry keys necessary to debug the Microsoft Transaction Server (MTS) processes. |
Workflow Suggestions for Using Local Mode
The following major steps to work locally are shown to help you identify tasks you might want to do to avoid unexpected results. For detailed procedures for each major step, see the Visual InterDev documentation on the MSDN Library CD.
You can tell that your project is in local mode by the next to the project name in the Project Explorer. You can also look at the project's properties.
Note Your data connections still work in local mode because the mode only affects the operations that maintain the local and master copies of files. Data connections are the same regardless of mode. You need a local copy of your data only if you work offline, are using dial-up access, or are working through a firewall. In those cases, you must have a local copy of the database and create a connection that uses the local data.
For the latest information, visit the Microsoft Visual InterDev Web site at http://msdn.microsoft.com/vinterdev.