Chapter 5. Setting Up Sites and Servers

IN THIS CHAPTER

  • Web site design and structure

  • Making a local site

  • Dreamweaver Technique: Setting Up Your Site

  • Working without a site

  • Generating and saving pages

  • Previewing your Web site

  • Publishing online

Web sites—especially those integrating Web applications—are far more than collections of HTML documents. Every image—from the smallest navigational button to the largest background image—is a separate file that must be uploaded with your HTML page. Moreover, if you use any additional elements, such as an included script, background sound, digital video, or Java applet, these files must be transferred as well. To preview the Web site locally and view it properly on the Internet, you have to organize your material in a specific manner.

In Dreamweaver, the process of creating a site can also involve developing Web applications in a particular server model. Dreamweaver is unique in its capability to author sites for a variety of server models. Although it is possible to mix pages developed for different server models, it's not really practical. Dreamweaver enables you to select one server model for each site.

Dreamweaver gives Web developers who work with existing sites a direct connection to the server. Working in this mode enables you to make quick corrections to a page and transfer files, but many of Dreamweaver's special features require that you establish a local site.

As I describe in this chapter, each time you begin developing a new site, you define several initial parameters, including the chosen server model (provided, of course, you are creating a dynamically driven site, such as a Web application). These steps lay the groundwork for Dreamweaver to properly link your local development site with a remote online site, as well as to link properly to your data sources (again, for dynamically driven sites). This chapter begins with a brief description of approaches to online design, aimed primarily at those who are just starting to create Web sites. The remainder of the chapter is devoted to the mechanics of setting up your site and basic file manipulation. You also learn how to connect directly to servers, without establishing a local site.

Planning Your Site

Planning in Web design, just as in any other design process, is essential. Not only does careful planning cut your development time considerably, but it makes it far easier to achieve a uniform look and feel for your Web site—making it friendlier and easier to use. This section briefly covers some of the basics of Web site design: what to focus on, what options to consider, and what pitfalls to avoid. If you are an established Web site developer who has covered this ground before, feel free to skip this section.

Primary considerations

Even before you choose the overarching structure for your site (as discussed in the following sections), you need to address the all-important issues of message, audience, and budget.

Deciding what you want to say

If I had to pick one overriding concern for Web site design, it would be to answer the following question: What are you trying to say? The clearer you are about your message, the more focused your Web site will be. To this end, I find it useful to try to state the purpose of the Web site in one sentence. "Creating the coolest Web site on the planet" doesn't count. Although it could be regarded as a goal, it's too open-ended to be useful. Here are some examples of clearly stated Web site concepts:

  • To provide the best small-business resource center focused on Adobe software

  • To chronicle the world's first voyage around the world by hot air balloon

  • To advertise music lessons offered by a collective of keyboard teachers in New York City

Targeting your audience

Right behind a site's concept—some would say neck-and-neck with it—is the site's audience. Who are you trying to reach? Quite often, a site's style is heavily influenced by a clear vision of the site's intended audience. Take, for example, Adobe's monthly Edge newsletter (www.adobe.com/newsletters/edge/). The Edge is an excellent example of a site that is perfectly pitched toward its target; in this case, the intended audience is composed of professional developers and designers. Hence, the site is snazzy but informative, and it is filled with exciting examples of cutting-edge programming techniques.

In contrast, a site that is devoted to mass-market e-commerce must work with a very different group in mind: shoppers. Everyone at one time or another falls into this category, so I am really talking about a state of mind, rather than a profession. Many shopping sites use a very straightforward page design that is easily maneuverable, comforting in its repetition—where visitors can quickly find what they are looking for and, with as few impediments as possible, buy it.

Determining your resources

Unfortunately, Web sites aren't created in a vacuum. Virtually all development work happens under real-world constraints of some kind. A professional Web designer is accustomed to working within a budget. In fact, the term budget can apply to several concepts.

First, you have a monetary budget—how much is the client willing to spend? This translates into a combination of development time (for designers and programmers), materials (custom graphics, stock photos, and the like), and ongoing maintenance. You can build a large site with many pages that pulls dynamically from an internal database and requires very little hands-on upkeep. Alternatively, you can construct a small, graphics-intensive site that must be updated by hand weekly. It's entirely possible that both sites end up costing the same.

Second, budget also applies to the amount of time you can afford to spend on any given project. The professional Web designer is quick to realize that time is an essential commodity. The resources needed when undertaking a showcase for yourself when you have no deadline are very different from those needed when you sign a contract on June 30 for a job that must be ready to launch on July 4.

The third real-world budgetary item to consider is bandwidth. The Web, with faster Internet connections and an improved infrastructure, is slowly shedding its image as the World Wide Wait. However, many users are still stuck with slow modems, which means that Webmasters must keep a steady eye on a page's weight—how long it takes to download under the most typical modem rates. Of course, you can always decide to include that animated video masterpiece that takes 8 minutes to download on a cable modem—you just can't expect everyone to wait to see it.

In conclusion, when you are trying to define your Web page, filter it through these three ideas: message, audience, and the various faces of the budget. The time spent visualizing your Web pages in these terms is time decidedly well spent.

Design options

Many Web professionals borrow a technique used extensively in developing other mass-marketing forms: storyboarding. Storyboarding for the Web entails first diagramming the various pages in your site—much like the more traditional storyboarding in videos or filmmaking—and then detailing connections for the separate pages to form the overall site. How you connect the disparate pages determines how your visitors navigate the completed Web site.

Note

In addition to formulating a Web site design, Web application developers must often be aware of how the data sources used by the site are structured. See Chapter 19 for a discussion of concerns and techniques in developing database layouts.

The following sections describe the basic navigational models. The Web designer should be familiar with them all because each one serves a different purpose, and they can be mixed and matched as needed.

The linear approach

Prior to the World Wide Web, most media formats were linear—that is, one image or page followed another in an unalterable sequence. In contrast, the Web and its interactive personality enable the user to jump from topic to topic. Nevertheless, you can still use a linear approach to a Web site and have one page appear after another, like a multimedia book.

The linear navigational model, shown in Figure 5-1, works well for computer-based training applications and other expository scenarios in which you want to tightly control the viewer's experience. Some Web designers use a linear-style entrance or exit from their main site, connected to a multilevel navigational model. With Dynamic HTML, you can achieve the effects of moving through several pages in a single page through server-side processing.

The linear navigational model takes the visitor through a series of Web pages.

Figure 5-1. The linear navigational model takes the visitor through a series of Web pages.

Warning

Keep in mind that Web search engines can index the content of every page of your site separately. Each page of your site—not just your home page—becomes a potential independent entrance point. Therefore, make sure every page includes navigation buttons back to your home page, especially if you use a linear navigational model.

The hierarchical model

Hierarchical navigational models emerge from top-down designs. These start with one key concept that becomes your home page. From the home page, users branch off to several main pages; if needed, these main pages can, in turn, branch off into many separate pages. Everything flows from the home page; it's very much like a company's organizational chart, with the CEO on top followed by the various company divisions.

The hierarchical Web site, shown in Figure 5-2, is best known for maintaining a visitor's sense of place in the site. Some Web designers even depict the treelike structure as a navigation device and include each branch traveled as a link. This enables visitors to quickly retrace their steps, branch by branch, to investigate different routes.

A hierarchical Web layout enables the main topics to branch into their own subtopics.

Figure 5-2. A hierarchical Web layout enables the main topics to branch into their own subtopics.

The spoke-and-hub model

Given the Web's flexible hyperlink structure, the spoke-and-hub navigational model works extremely well. The hub is, naturally, the site's home page. The spokes projecting from the center connect to all the major pages in the site. This layout permits quick access to any key page in just two jumps—one jump always leading back to the hub/home page and one jump leading in a new direction. Figure 5-3 shows a typical spoke-and-hub structure for a Web site.

This storyboard diagram for a zoo's Web site shows how a spoke-and-hub navigational model might work.

Figure 5-3. This storyboard diagram for a zoo's Web site shows how a spoke-and-hub navigational model might work.

The main drawback to the spoke-and-hub structure is the required return to the home page. Many Web designers get around this limitation by using frames to make the first jump off the hub into a Web page; this way, the navigation bars are always available. This design also enables visitors using nonframes-capable browsers to take a different path.

The full Web design

The seemingly least structured approach for a Web site—full Web—takes the most advantage of the Web's hyperlink capabilities. This design enables virtually every page to connect to every other page. The full Web design, shown in Figure 5-4, works well for sites that are explorations of a particular topic because the approach encourages visitors to experience the site according to their own needs, not based on the notions of any one designer. The danger in using full Web for your site design is that a visitor can literally get lost. As an escape hatch, many Web designers include a link to a clickable site map, especially for large-scale sites using this design.

In a full Web design, each page can have multiple links to other pages.

Figure 5-4. In a full Web design, each page can have multiple links to other pages.

Mapping Dynamic Pages for Web Applications

Many, if not most, Web applications require more than one Web page. One variation on a search engine, for example, might use the following:

  • An entry page containing the form elements (text field, list boxes, and so on) that make up the search criteria

  • A results page that displays the list of items matching the search criteria; each of the items typically provides a link to a detail page and more information

  • A detail page (or pages) that provide more information—this page is linked from the results page

  • An error page, if the initial search criteria do not have any matches

The experienced Web developer maps out the structure for all the anticipated Web applications in the site before beginning the building process. In addition to providing a truer picture of the work involved, mapping the required pages highlights potentially redundant pages—for example, the same error page may be used throughout the site—and pinpoints areas that would benefit from dynamic data application. The Web application map can also serve as a workflow schematic that shows which pages are static HTML and could be built by an HTML designer with little or no coding experience (typically, the entry and error pages); and which pages are dynamic Web pages that require data-aware designers.

Defining a Site

Now that you've decided on a design and mapped your site, you're ready to set it up in Dreamweaver. When you define a site, you are telling Dreamweaver where to store your Web pages locally, where to transfer them to remotely, as well as the style of code in which to write them. Defining a site is an essential first step.

The Site Definition dialog box provides two operational modes: Basic and Advanced. In Basic mode, also known as the Site Definition Wizard, you specify the bare essentials for editing, testing, and sharing your site files. In Advanced mode, you can specify all your site parameters, from the most basic down to the most obscure.

Using the Site Definition Wizard

There are two main paths through the Site Definition Wizard:

  • One for sites that do not use a server technology—sites that contain no server-side code, just client-side HTML, JavaScript, and so on

  • One for sites that use a server technology—sites that contain server-side code, such as ColdFusion, ASP, JSP, and so on

To keep things simple, I've written a separate procedure for each of these paths, which I provide in the following sections. Be sure to choose the correct path before you launch into your site definition!

Note

Using the Site Definition Wizard to define a new site is a quick, convenient way to get a site off the ground. In some cases, however, it is not complete. Depending on the site, you might have to use the Advanced tab of the Site Definition dialog box to specify additional site options, such as testing server details, cloaking, and so on.

Defining a site that does not use a server technology

To use the Site Definition Wizard to define a site that does not use a server technology (that is, a site that contains no server-side code), perform the following steps:

  1. Choose Site

    Defining a site that does not use a server technology
  2. In the Manage Sites dialog, click New and select Site from the submenu to open the Site Definition dialog box.

  3. Click the Basic tab of the Site Definition Wizard if it is not already selected. If a message appears informing you that the root folder you have chosen is the same as another folder, ignore it, and click OK to close the message box.

    In the What Would You Like To Name Your Site? field, type a name to identify your site within Dreamweaver, as shown in Figure 5-5. Choose a descriptive name; spaces are fine, for example, mySite, my_site, My Site, and so on are all acceptable. To keep things simple, I recommend avoiding apostrophes, such as Joe's Site, joe's_site, and so on.

    Use the Site Definition Wizard to define a new site.

    Figure 5-5. Use the Site Definition Wizard to define a new site.

  4. If you know it, enter the Web address of your site in the What Is The HTTP Address (URL) Of Your Site? field. Be sure to enter the fully formed URL beginning with http://; click Next when you're done.

  5. In the second page of the wizard, Editing Files, Part 2, select No to the prompt Do You Want To Work With A Server Technology? Click Next to proceed.

  6. In the Editing Files, Part 3 page of the wizard, select the appropriate option for How Do You Want To Work With Your Files During Development? The choices are: Edit Local Copies On My Machine Then Upload To Server When Ready or Edit Directly On Server Using Local Network.

    If you choose Edit Local Copies On My Machine, you must create and/or specify the site's root folder on your local disk in the Where On Your Computer Do You Want To Store Your Files? field.

    If you choose Edit Directly On Server Using Local Network, you must create and/or specify the site's root folder on your network in the Where Are Your Files On The Network? field.

  7. Click Next to move to the Sharing Files page of the wizard.

    Note

    This page of the wizard does not appear if you chose Edit Directly On Server Using Local Network in step 6.

    In the How Do You Connect To Your Remote Server? field list box, select the appropriate option: FTP, Local/Network, RDS, SourceSafe Database, or WebDAV. If you do not know which option to choose, or if you want to specify your server connection type later, select None. (For more information on each of these options, turn to Dreamweaver's built-in help.)

    Depending on the option you choose, a set of suboptions appears. Respond appropriately to these.

  8. Click Next to move to the Sharing Files, Part 2 page of the wizard.

    Note

    This page of the wizard does not appear if you chose None in step 7 or Edit Directly On Server Using Local Network in step 6.

    Select the appropriate option for the prompt Do You Want To Enable Checking In And Checking Out Files? Select Yes to ensure that different people cannot edit the same document at the same time. Select No if this is not a concern.

    Warning

    The Check In/Check Out system is a version-control system that is only effective if all members of the development team have the setting enabled. When someone has checked out a file, and you attempt to open it, Dreamweaver prompts you that the file is checked out. If someone on the team doesn't have Check In/Check Out enabled, however, he or she doesn't receive such a prompt. That person can open, edit, and upload the file, posing a potential version-control issue. See Chapter 31 to learn more about Dreamweaver's Check In/Check Out feature.

  9. Click the Next button to move to the final, Summary page of the wizard. Review your selections; if necessary, use the Back button to change them.

  10. When you've confirmed your choices, click Done to create your site. An alert box informs you that Dreamweaver is going to create a site cache, which makes various site operations run faster.

  11. In the Files panel, click the Expand/Collapse button to expand to remote/local pane view. In the Local Files pane (on the right, by default), Dreamweaver shows the local root folder for your newly defined site to enable you to view all your local disks/folders/files. In the Remote Site pane (on the left, by default), Dreamweaver shows your remote folders/files (depending on your site definition, you might need to click the Connects To Remote Host button to show the remote folders/files).

Defining a site that uses a server technology

To use the Site Definition Wizard to define a site that uses a server technology (that is, a site that contains server-side code), perform the following steps:

  1. Choose Site

    Defining a site that uses a server technology
  2. In the Manage Sites dialog, click New and select Site from the submenu to open the Site Definition dialog box.

  3. Click the Basic tab of the Site Definition Wizard if it is not already selected. If a message appears informing you that the root folder you have chosen is the same as another folder, ignore it, and click OK to close the message box.

    In the What Would You Like To Name Your Site? field, enter a name to identify your site within Dreamweaver (refer to Figure 5-5). Choose a descriptive name; spaces are fine, for example, mySite, my_site, My Site, and so on are all acceptable. To keep things nice and simple, I recommend avoiding apostrophes, such as Joe's Site, joe's_site, and so on.

  4. If you know it, enter the Web address of your site in the What Is The HTTP Address (URL) Of Your Site? field. Be sure to enter the fully formed URL beginning with http://; click Next when you're done.

  5. Click Next to move to the second page of the wizard, Editing Files, Part 2. Select Yes to the prompt Do You Want To Work With A Server Technology? Specify the server technology in the Which Server Technology? drop-down list: ColdFusion, ASP, PHP, and so on.

    Dreamweaver recognizes if you have ColdFusion installed on your system and notifies you that it is available for use.

  6. Click Next to move to the Editing Files, Part 3 page of the wizard. Select the appropriate option for How Do You Want To Work With Your Files During Development? The choices are: Edit And Test Locally; Edit Locally Then Upload To Remote Testing Server; or Edit Directly On Remote Testing Server Using Local Network.

    If you choose either of the first two options, you must create and/or specify the site's root folder on your local disk in the Where On Your Computer Do You Want To Store Your Files? field.

    If you choose Edit Directly On Remote Testing Server Using Local Network, create and/or specify the site's root folder on your network in the Where Are Your Files On The Network? field.

  7. Click Next to move to the Testing Files page of the wizard. At this point, the Site Definition Wizard branches off into several different subpaths, depending on the option you chose in step 5.

    Note

    Your step 7 subpath might consist of one or several wizard pages. The thing to remember: All step 7 subpaths eventually lead to step 8's Summary page.

    Describing all possible subpaths would take several pages, and to wade through them would be counterproductive. Fortunately, the options you must choose in each subpath are quite self-explanatory: the absolute URL of your remote site root (http://hostname/path/filename), the method you use to connect to your remote server (such as FTP, Local/Network, or RDS), and so on.

    Tip

    Remember: If you get confused or stuck, help is but a keypress (F1) or a mouse click (Help button) away.

    One option you might not be familiar with is: Do You Want To Enable Checking In And Checking Out Files? Select Yes to ensure that different people cannot edit the same document at the same time. Select No if this is not a concern.

    Warning

    The Check In/Check Out system is a version-control system that is only effective if all members of the development team have the setting enabled. When someone has checked out a file and you attempt to open it, Dreamweaver prompts you that the file is checked out. If someone on the team doesn't have Check In/Check Out enabled, however, he or she doesn't receive such a prompt. That person can open, edit, and upload the file, posing a potential version-control issue. See Chapter 31 to learn more about Dreamweaver's Check In/Check Out feature.

  8. When you have successfully worked through all your step 7 subpaths, the final Summary page of the wizard appears. Review your selections, as listed in the Summary page; if necessary, use the Back button to change them.

  9. When all is well, click Done to create your site. An alert box informs you that Dreamweaver is going to create a site cache, which makes various site operations faster. (Note: If the Don't Show Me This Message Again option is selected, this alert box does not appear.) Click OK to have Dreamweaver create your specified site.

  10. In the Files panel, click the Expand/Collapse button to expand to remote/local pane view. In the Local Files pane (on the right, by default), Dreamweaver shows the local root folder for your newly defined site to enable you to view all your local disks/folders/files. In the Remote Site pane (on the left, by default), Dreamweaver shows your remote folders/files (depending on your site definition, you might need to click the Connects To Remote Host button to show the remote folders/files).

Using Advanced mode

Advanced mode comprises eight categories of information: Local Info, Remote Info, Testing Server, Cloaking, Design Notes, Site Map Layout, File View Columns, and Contribute. Note that only the first three categories—Local Info, Remote Info, and Testing Server—are essential for site definition. Once I became familiar with the interface, I found Advanced mode to be much easier to navigate than Basic mode.

Note

The other categories in the Site Definition dialog box Advanced mode (Cloaking, Design Notes, Site Map Layout, and File View Columns) are helpful for working in a team environment and for working visually with Dreamweaver's Site Map; you can find more information on these features later in this chapter and in Chapter 31.

The three main steps to defining a site in Dreamweaver are

  1. Locate the folder to be used for the local development site.

  2. Enter the remote site information.

  3. If you are creating a Web application, specify the testing server model to be used for the site.

Establishing local connections

After your site is on your Web server and fully operational, it consists of many files—server-side pages, plain HTML, graphics, and other media files—that make up the individual Web pages. All these associated files are kept on the server in one folder, which may use one or more subfolders. This main folder is called the remote site root. In order for Dreamweaver to properly display your linked pages and embedded images—just as they are displayed online—the program creates a mirror of your remote site on your local development system. This primary mirror folder on your system is known as the local site root.

You must establish the local site root at the beginning of a project. This ensures that Dreamweaver duplicates the complete structure of the Web development site when it comes time to publish your pages to the Web. One of Dreamweaver's key site-management features enables you to select just the HTML pages for publication; Dreamweaver then automatically transfers all the associated files, creating any needed folders in the process. The mirror images of your local and remote site roots are critical to Dreamweaver's capability to expedite your workload in this way.

Tip

If you do decide to transfer an existing Web site to a new Dreamweaver local site root, run Dreamweaver's Link Checker after you've consolidated all your files. Choose Site

Establishing local connections

To set up a local site root folder in Dreamweaver, follow these steps:

  1. Choose Site

    Establishing local connections
  2. In the Manage Sites dialog, choose New and select Site from the submenu to open the Site Definition dialog box. The Site Definition dialog box opens, as shown in Figure 5-6. If the Advanced tab is not already selected, select it now.

    Note

    If the root folder you have chosen is the same as another site folder, a prompt appears. If you have intentionally chosen the same folder, it's safe to ignore the warning and click OK to close it. However, using the same folder for multiple sites is not a typical practice, and it should be undertaken only by advanced users.

  3. From the Local Info category, type a name for your site in the Site Name text box. This is the name that appears in the Sites drop-down list and the Edit Sites dialog box.

  4. Specify the folder to serve as the local site root by either typing the pathname directly into the Local Root Folder text box or clicking the folder icon to open the Choose Local Root Folder dialog box. When you've made your choice there, click the Select button.

  5. Leave the Refresh Local File List Automatically option selected. This option ensures that new files are automatically included in the list, and it relieves you from having to select the Refresh command manually.

  6. If your site is to have a dedicated images folder, specify it in the Default Images Folder text box. Note that your Default Images Folder can have subfolders.

  7. Choose which type of links you'd prefer to use by default: Relative To Site Root or Document Relative. If you're unsure, leave the standard option, Document Relative.

  8. Enter the full URL for your site in the HTTP Address text box. When checking links for your Web site, Dreamweaver uses the HTTP address to determine whether absolute links, such as www.idest.com/dreamweaver/index.htm, reference external files or files on your site.

    Set up your local site root through the Site Definition dialog box.

    Figure 5-6. Set up your local site root through the Site Definition dialog box.

  9. If you'd like to make sure that your links match files' names, including their case, choose the Use Case-Sensitive Link Checking option. This option is most helpful when your site is hosted on a Unix server that relies on case-sensitive filenames.

  10. For fastest performance, select the Enable Cache option. Having a site cache enables Dreamweaver to store information that makes certain key site tasks, such as link updates, run faster.

Specifying the remote site

In addition to defining the local site root, you must specify information pertaining to the remote site. The remote site may be a folder accessed through the local network or via FTP (File Transfer Protocol). If your remote site is located on the local network—in this arrangement, the remote site is often said to be on a staging server—all you do is select or create the particular folder to house the remote site. At the appropriate time, the network administrator or other designated person from the Information Technology department exports the files from the staging server to the Web or intranet server.

Note

Many Dreamweaver developers have a Web server located on their development system, making it possible to have both the local and remote sites on the same machine.

If, on the other hand, you post your material to a remote site via FTP, you need various bits of information to complete the connection. In addition to the FTP host's name—used by Dreamweaver to find the server on the Internet—you also need, at a minimum, the user name and password to log on to the server. The host's technical support staff can provide you with this and any other necessary information.

Warning

Although it's entirely possible to develop your site locally without establishing a remote site root, it's not a recommended practice. Web sites require extensive testing in real-world settings—something that's just not possible with a local development setup. If you don't have the necessary information to establish a remote site root initially, you can still begin development locally; just be sure to transfer your files to your remote site and begin testing as soon as possible.

To enter the remote site information, follow these steps:

  1. Continuing in the Site Definition dialog box, select the Remote Info category.

  2. From the Access drop-down list, shown in Figure 5-7, choose the Web-server access description that applies to your site (FTP is shown in Figure 5-7):

    Choose whether your remote site is to be accessed via the local network or by FTP in the Remote Info category.

    Figure 5-7. Choose whether your remote site is to be accessed via the local network or by FTP in the Remote Info category.

    • None: Choose this option if your site is being developed locally and is not to be uploaded to a Web server at this time.

    • FTP: Select this option if you connect to your Web server via File Transfer Protocol (FTP).

    • Local/Network: Select this option if you are running a local Web server and want to store your remote site on your local drive, or if your Web server is mounted as a network drive.

    • RDS: Choose this option if you are working with a ColdFusion site that has Remote Development Services (RDS) enabled.

    • SourceSafe Database: Select this option to integrate Dreamweaver's Check In/Check Out system with a running version of Microsoft's Visual SourceSafe.

    • WebDAV: Choose this option to store your files remotely in a Web-based Distributed Authoring and Versioning (WebDAV) system.

  3. If you selected None for access, skip the rest of this procedure and continue with the next section, "Adding Testing Server Details."

  4. If you selected FTP for access, complete the following options:

    • FTP Host: Enter the host name of the FTP connection for your Web server, which is usually in the form ftp.sitename.com. Do not include the full URL, such as ftp://ftp.sitename.com.

    • Host Directory: Enter the directory in which publicly accessible documents are stored on the server. Typical host directory names are www/public/docs/ and public_html/. Your remote site root folder is a subfolder of the host directory. If you are unsure of the exact name of the host directory, check with your Web server administrator. Often, the FTP host connects to the correct directory automatically, and you can leave this field blank.

    • Login: Enter the login name you have been assigned for access to the Web server.

    • Password: Enter the password necessary for you to gain access to the Web server. Note that many servers are case-sensitive when it comes to logins and passwords!

    • Save: Dreamweaver automatically selects this option after you enter a password. Deselect it only if you and others access the server from the current system.

    • Use Passive FTP: Passive FTP establishes the FTP connection through the local software, rather than the server. Certain firewall configurations use passive FTP; check with your network administrator to see if you need it.

    • Use IPv6 Transfer Mode: IPv6 (Internet Protocol version 6) is the most recent networking communication standard enjoying widespread adoption. Select this option if you need to connect to an IPv6-enabled FTP server.

    • Use Firewall: This option is automatically selected if you've set the Preferences with the correct firewall host/port information (to access this information, click the Firewall Settings button).

    • Use Secure FTP (SFTP): Secure FTP protects sensitive information such as passwords and user names by encrypting them before sending the data over the Internet. Select this option if you're working in an SFTP environment.

    • Automatically Upload Files To Server On Save: Choose this option to store files locally and remotely simultaneously. Under most circumstances, I do not recommend that this option be selected, because the risk for uploading unfinished work is too great.

    • Enable File Check In And Check Out: Select this option when working with other designers or contributors on a site.

    • Test: After you've specified all your FTP parameters, you can click the Test button to verify that Dreamweaver can connect successfully to your Web server.

  5. If you're having trouble connecting to your server, click Server Compatibility. A small dialog box opens with two options: Use FTP Performance Optimization and Use Alternative FTP Move Method. The first option is selected by default; deselect it if Dreamweaver cannot connect to your server. Choose the second option if errors occur either when rollbacks are enabled or when moving files on the remote server.

  6. If you selected Local/Network for access, enter the name of the remote folder in the Remote Folder text box or click the folder icon to locate the folder. If you want to automatically update the remote file list (recommended), select the Refresh Remote File List Automatically option. You also have the option to automatically upload files to the remote server when saved locally (not recommended) and to enable file check in and check out—a valuable option when working on a site with others.

Adding testing server details

The final primary element for defining sites using the Advanced tab is supplying the server application information. One key aspect of Dreamweaver's power is its capability to create the same application for different server models using different scripting languages. The Live Data Preview—which enables designers to work with data directly from the data source—is another unique Dreamweaver feature. Settings in the Testing Server category of the Site Definition dialog box control both of these features.

To set the Testing Server options, follow these steps:

  1. Continuing in the Site Definition dialog box, choose the Testing Server category (see Figure 5-8).

    Before you can create any dynamic pages in Dreamweaver, you must choose a server model from the Testing Server category.

    Figure 5-8. Before you can create any dynamic pages in Dreamweaver, you must choose a server model from the Testing Server category.

  2. From the Server Model list, choose the application server to be used in this site: ASP JavaScript, ASP VBScript, ASP.NET C#, ASP.NET VB, ColdFusion, JSP, PHP MySQL, or None.

  3. To set the way in which you connect with your testing server, choose FTP, Local/Network, or None from the Access list. If you choose None, Live Preview is not available. The options for FTP and Local/Network are the same as those found in the Remote Info category.

    Tip

    After selecting your options, it's always a good idea to click Test to make sure your connection is solid.

  4. In the URL Prefix field, enter the HTTP address for the root folder on the testing server. If you're working locally, your URL Prefix is likely to start with http://localhost/.

  5. Click OK to close the Site Definition dialog box.

Note

Dreamweaver doesn't save the site definition information until the program exits. If Dreamweaver should unexpectedly quit—the politically correct term for crash—any changes made to the Site Definition dialog box in the session are lost.

Cloaking Site Folders

Dreamweaver supports site cloaking, which enables you to exclude (cloak) specified site folders from operations such as Put, Get, Check In/Out, Synchronize, and so on. (For a full list of cloaked operations, see the following paragraphs.) The site cloaking feature can save you a significant amount of upload/maintenance time. Suppose that you're working on a site that contains several dozen large MP3 files, all stored in a folder named mp3s. You can cloak the mp3s folder, so that when you put (upload) your site files at the end of the day, you don't end up re-putting all those mp3 files, which most likely haven't changed, anyway.

Note

A site's folder-cloaking settings are sticky; after you've specified them, Dreamweaver remembers them whenever you work on the site.

Cloaking excludes cloaked folders from the following operations:

  • Put, Get

  • Check In, Check Out

  • Reports

  • Select Newer Local, Select Newer Remote

  • Sitewide commands, such as Check Links Sitewide and Find And Replace Entire Site

  • Synchronize

  • Asset panel contents

  • Template and library updating

Cloaking and uncloaking site folders is a breeze. Follow these steps:

  1. In the Files panel, select the desired site from the drop-down list box. Note that this site must have cloaking enabled in the Site Definition dialog box, which is the default site setting. If, however, you need to enable cloaking for a site, choose Site

    Cloaking Site Folders
  2. Select the folder(s) you want to cloak or uncloak.

  3. From the Options menu of the Files panel, choose Site

    Cloaking Site Folders
    You can easily cloak or uncloak your site folders.

    Figure 5-9. You can easily cloak or uncloak your site folders.

    To uncloak all site folders (and files), choose Site

    You can easily cloak or uncloak your site folders.

Warning

When you uncloak an entire site, you cannot undo it! If you want to recloak folders, you have to do so manually.

Managing Site Info

You can change any of the information associated with your local site roots by choosing Site

Managing Site Info

After your participation in a project has ended, you can remove the site from your list. In the Edit Sites dialog box, choose the site you want to remove, and click the Remove button. Note that this action removes the site only from Dreamweaver's internal site list; it does not actually delete any files or folders from your hard drive.

Tip

Before you remove a site, make sure you export the site settings by choosing Export from the Manage Sites dialog box (Site

Managing Site Info

With the local site root folder established, Dreamweaver can properly manage links regardless of whether the document relative or site root relative format is used.

Note

You can find a discussion of document relative and site root relative addressing in Chapter 10.

Working Directly with Servers

Web designers work under a variety of conditions. Some designers are tasked with making small modifications to a range of individual Web pages on a variety of sites rather than focusing on the development and maintenance of complete sites. For these types of jobs, it is often unnecessary to define a site in Dreamweaver—all you really need is a connection to the server. After you establish a server connection, you can download files to your local system, make your modifications, and put the altered files back on the server.

If you prefer, Dreamweaver now gives you the option to work without establishing a site. You can create connections via either FTP (File Transfer Protocol) or RDS (Remote Development Services). RDS is a component of the ColdFusion server used for file transfer. After the server connection is created, Dreamweaver lists the available files in the Files panel, just like a standard site. When you open a file, that file and any dependent files are transferred to your local system for editing. If you save the file, Dreamweaver automatically stores the modified file on the server and erases the local copy.

Although convenient for simple modifications, working without a defined site does have its limitations. If you use this technique, none of Dreamweaver's sitewide features are available, including templates, library items, check in/check out, cloaking, and link checking, among others.

Warning

You should exercise extreme care when working directly with server files. In most situations, it is strongly advised that you work with Dreamweaver's defined site structure, particularly if other designers are working on the site. Without some sort of revision control, such as Dreamweaver's Check In/Check Out feature, it is entirely possible that work can be inadvertently lost.

Establishing a siteless server connection

Whether or not you define a site, you create, edit, and remove server connections by using the Manage Sites dialog box. The type of remote access—FTP or RDS—you choose for a server determines how the connection is listed. Connections using FTP are listed with an ftp:// preface, whereas those using RDS start with rds://, as in rds://myclientserver.

Warning

Certain sitewide operations, such as link checking, synchronizing sites, and templates, are not available when working directly with a server.

To set up an FTP server connection, follow these steps:

  1. Choose Site

    Establishing a siteless server connection
  2. In the Manage Sites dialog box, click New and select FTP & RDS Server from the pop-up menu, as shown in Figure 5-10.

    The Manage Sites dialog also manages server connections.

    Figure 5-10. The Manage Sites dialog also manages server connections.

    Dreamweaver reminds you that although server connections enable you to work directly with files on the server, you cannot carry out sitewide actions.

  3. When the Configure Server dialog box opens, enter an appropriate title to identify the connection in the Name field.

  4. Make sure FTP is chosen from the Access Type list. Dreamweaver displays different fields according to the Access Type chosen; the FTP fields are shown in Figure 5-11.

    The same information used to set up a remote site with FTP is used for an FTP server.

    Figure 5-11. The same information used to set up a remote site with FTP is used for an FTP server.

  5. Enter the FTP address in the FTP Host field. The FTP Host should be a partial Internet address, such as ftp.idest.com.

  6. Enter the site root folder, if any, in the Host Directory field. Depending on the FTP server setup, you may or may not have a host directory. Often, such directories have names like www/ or public/.

  7. Enter the Login name and Password in the corresponding fields. It's a good idea to verify your connection information at this stage by clicking Test. Dreamweaver lets you know whether the connection is made successfully.

  8. Select any of the necessary optional settings:

    • Use Passive FTP

    • Use IPv6 Transfer Mode

    • Use Firewall

    • Use Secure FTP (SFTP)

  9. If you have selected the Use Firewall option, click Firewall Settings and make sure the Firewall Host and Firewall Port settings are correct.

  10. Set the Internet address in the URL Prefix field to correspond to the site root.

  11. Click OK when you're finished to create the connection.

To set up an RDS connection to a ColdFusion server, follow these steps:

  1. Choose Site

    The same information used to set up a remote site with FTP is used for an FTP server.
  2. In the Manage Sites dialog box, click New and select FTP & RDS Server from the pop-up menu. Dreamweaver reminds you that although server connections enable you to work directly with files on the server, you cannot carry out sitewide actions; feel free to select the Don't Show Me This Message Again option at any point.

  3. Enter an appropriate title for your RDS connection in the Name field of the Configure Server dialog box.

  4. Select RDS from the Access Type list.

  5. Click Settings to open the Configure RDS Server dialog box, shown in Figure 5-12.

    Access the Configure RDS Server dialog through the Settings button.

    Figure 5-12. Access the Configure RDS Server dialog through the Settings button.

  6. In the Configure RDS Server dialog, enter the URL or IP address for the server in the Host Name field.

  7. Enter the appropriate Port number; the default Port value is 80.

  8. In the Full Host Directory field, enter the path to the site folder on the remote system, for example, c:inetpubwwwrootigco.

  9. If you're working with a secure HTTP connection, select the Use HTTPS option.

  10. If necessary, enter the user name and password in the appropriate fields. The Username and Password field options may not appear, depending on the settings of the ColdFusion Administrator.

  11. Select Save to retain your settings. If you do not select Save, you must re-enter the settings information every time you connect to the server.

  12. Click OK to close the Configure RDS Server dialog.

  13. Enter the Internet address to the server root in the URL Prefix field.

  14. Click OK to close the dialog and create the server connection.

When you're finished defining either an FTP or RDS server, you can continue managing your sites and server connections or click Done to close the Manage Sites dialog. If a server is selected when you close the dialog, Dreamweaver connects to the server and displays the available files in the Files panel.

Accessing server files

After being defined, all the servers are listed along with the sites in the Files panel pop-up menu. As noted earlier, the type of server is used as a preface to the defined name. Thus, all the FTP servers are grouped together as are all the RDS servers; servers are listed above the standard site list in the pop-up menu, as shown in Figure 5-13. Choose any server from the list to open a connection and list the files. After the files are listed, you can choose any one just as you would select a file from a defined site, by double-clicking the filename to open the file. Dreamweaver automatically downloads the file and any dependent files, such as images, needed to render the page.

All server connections are found above the defined sites in the Files panel pop-up.

Figure 5-13. All server connections are found above the defined sites in the Files panel pop-up.

Tip

Although there is no Expand/Collapse icon displayed atop the docked Files panel when a server connection is chosen, the full-window option is still available from the Options menu: Expand Files Panel. After the panel is expanded, click the Expand/Collapse icon to return to the condensed panel view.

In addition to sites and server connection, the Files panel also provides access to local and mapped network drives. You find the additional connections at the top of the pop-up list, above the defined sites and servers.

Note

For the files of a mapped network drive to appear, you must be logged in to that drive.

After you finish modifying the page, choose File

All server connections are found above the defined sites in the Files panel pop-up.

Creating and Saving New Pages

You've considered message, audience, and budget issues. You've chosen a design. You've set up your site and its address. All the preliminary planning is completed, and now you're ready to really rev up Dreamweaver and begin creating pages. This section covers the basic mechanics of opening and saving Web pages during development.

Starting Dreamweaver

Start Dreamweaver as you would any other program. Double-click the Dreamweaver program icon, or single-click if you are using Internet Explorer's Desktop Integration feature in Windows or if you have Dreamweaver's icon in your Dock on OS X. After the splash screen, Dreamweaver opens with the Welcome Screen, which lists 10 of your previously opened documents and also offers a full range of new document types. Choose HTML from the Welcome Screen to create a new blank page. This page is created from the Default.html file found in Dreamweaver's Configuration/DocumentTypes/NewDocuments folder. Of course, you may want to replace the original Default.html file with one of your own—perhaps with your copyright information. All your blank pages are then created from the template that you've designed.

Tip

If you do decide to create your own Default template, it's probably a good idea to rename the Dreamweaver Default template—as Original-Default.html or something similar—prior to creating your new, personalized Default template.

Opening existing files

To open an existing file that belongs to a site you've defined in Dreamweaver, select the site in the Files panel and double-click the file icon. Recently opened files, regardless of their origin, are available through the Welcome Screen or from the File

Opening existing files

To open an existing file that does not belong to a site defined in Dreamweaver—or that was created in a different program—choose File

Opening existing files

Tip

You can enable/disable Dreamweaver from automatically repairing HTML syntax errors in your files when it opens them. Choose Edit

Opening existing files

To add an entry, place your cursor at the end of the line above where you want your new file format to be placed, and press Enter (Return). Type in your file extension(s) in capital letters followed by a colon and then the text description. Save the Extensions.txt file and restart Dreamweaver to see your modifications.

Opening a new file

You can work on as many Dreamweaver files as your system memory can sustain. When you choose File

Opening a new file

Tip

If you are using the Windows version of Dreamweaver and are working with maximized documents, you can easily switch among open files by clicking their respective tabs at the top of the Document window or by using the Windows menu.

Each time you open a new file, Dreamweaver temporarily names the file Untitled-n, where n is the next number in sequence. This naming convention prevents you from accidentally overwriting a new file opened in the same session.

Note

Using the New Document dialog box to create new documents of all types (HTML, JavaScript, ASP, ColdFusion, and so on) is discussed in detail later in this chapter in the section "Creating New Documents."

Saving your file

Saving your work is very important in any computer-related task, and Dreamweaver is no exception. To initially save the current file, choose File

Saving your file

By default, all HTML files are saved with an .htm filename extension. Different file formats are saved with different extensions; XML documents, for example, are stored with an .xml extension. To save your file with another extension, such as .shtml or .xhtml, change the Save as Type option to the specific file type and then enter your full filename with the extension.

Warning

Although it may seem kind of backward in this day and age of long filenames, it's still a good idea to choose all-lowercase names for your files without spaces or punctuation other than an underscore or hyphen. Otherwise, not all servers read the filename correctly, and you have problems linking your pages.

Saving to remote servers

The section "Working Directly with Servers" described how Dreamweaver automatically transfers a modified file to a defined server when you are working in a siteless mode. But do you know that you can also store files on any server?

The capability to save to a remote server comes in handy in a number of situations. If a designer has files to work on locally and the connection information needed for uploading them, he doesn't need to create a local site. All he needs is a connection to the server and the knowledge of where the file should be stored. Because the designer is working without a locally defined site, the file must be saved in a particular location.

To save a file on a remote server, follow these steps:

  1. Choose File

    Saving to remote servers
    Servers must be previously defined in Dreamweaver to be listed in the Save File dialog box.

    Figure 5-14. Servers must be previously defined in Dreamweaver to be listed in the Save File dialog box.

  2. Double-click the server where you want to store the file. Dreamweaver connects to the server and retrieves a folder and file listing.

  3. Navigate to the desired folder and enter a name for your file in the Filename field.

  4. Click Save to transfer the file or Cancel to abort.

Dreamweaver transfers the current file as well as any dependent files.

Tip

The Save to Remote Server feature can also be used to move a file from one site to another. Instead of choosing a server connection from the Save File dialog, select a previously defined site. Selecting the site opens the remote server for the selected site.

Closing the file

When you're done working on a file, you can close it by choosing File

Closing the file

Note

You can easily tell whether a file has been altered since the last save by looking at the title bar. Dreamweaver places an asterisk after the filename in the title bar for modified files. Dreamweaver is even smart enough to properly remove the asterisk should you reverse your changes with the Undo command or the History panel. On OS X you also see that the close widget on the document window appears filled in when the file is unsaved.

Quitting the program

When you're finished working for the day—or, more often, the late, late night—you can close Dreamweaver by choosing File

Quitting the program

Tip

Have to stop work in the middle of a session and want to get back to work ASAP? Leave one or more documents open when you close Dreamweaver and they'll reappear when the program next launches. To enable this feature, choose the Reopen On Startup option from the General category of Preferences.

Creating New Documents

Dreamweaver provides three methods for creating new documents:

  • Select your preferred document type from the Create New column of the Dreamweaver Welcome Screen.

  • You can use the New Document dialog box to create a new document of a type that you select from a comprehensive list within the following categories: Basic Page, Dynamic Page, Template Page, Other, CSS Style Sheets, Framesets, Page Designs (CSS), Page Designs, and Page Designs (Accessible). If you work with multiple document types, this is the way to go.

  • You can create a new document of a default type that you've specified in the Preferences dialog box. If you work mostly with one document type—HTML, ColdFusion, or ASP, for example—this method can prove very convenient.

Using the New Document dialog box

Dreamweaver offers a wide range of starting points through the New Document dialog box: you can start off with anything from a completely blank page to the basic HTML code to a fully CSS compliant, 3-column elastic design with header and footer.

Note

The entire New Document dialog box has been redesigned for Dreamweaver CS3, with a great deal of new content to fill it. All of the layouts listed when the Blank Page

Using the New Document dialog box

To create a new document using the New Document dialog box, follow these steps:

  1. Choose File

    Using the New Document dialog box
    Choose the type of new file you want to start with through the New Document dialog box.

    Figure 5-15. Choose the type of new file you want to start with through the New Document dialog box.

  2. In the New Document dialog, select the category of new document that you want to create: Blank Page, Blank Template, Page from Template, Page from Sample, or Other.

  3. The adjoining columns and page preview change according to the New Document category selected. The following steps assume that the Blank Page category has been selected.

  4. In the Page Type list, select the specific type of document you want to create: HTML, HTML Template, Library item, and so on. The page types are grouped into static page types, which do not require an additional application server, and dynamic page types, which do.

  5. From the Layout column, choose the basic page design. Select <none> for a blank HTML page. Select any layout to view the illustrated preview and read a brief description of the design. Several key terms are used to identify layout characteristics:

    • Fixed—Notes a column or other page component where the width is defined in pixels. A fixed width layout does not expand or contract.

    • Elastic—Identifies a column or other page component where the width is defined in ems rather than pixels. Ems are a percentage-based unit of measurement. An ems-based layout permits the design to expand or contract when the page visitor changes the text size in the browser.

    • Liquid—Indicates a column or other page component where the width is defined as a percentage, which expand or contract with the browser window width.

    • Hybrid—Includes at least one page element defined as elastic and one defined as liquid. Typically, a hybrid design includes one or more elastic sidebars with an outer liquid container that envelops both the sidebar(s) and the main content area. With such a design, if the width of the browser window expands, the overall liquid page design and content area expand as well, but the elastic sidebar remains the same width. If the text size is increased, the elastic sidebar(s) expand, shrinking the adjacent main content area while the width of a layout as a whole remains the same as shown in Figure 5-16.

      This hybrid design adjusts to changes both in user-selected text size and browser window width.

      Figure 5-16. This hybrid design adjusts to changes both in user-selected text size and browser window width.

  6. If desired, select a different option from the Document Type (DTD) list. Note that this setting does not stick; you'll need to reset it each time or select a new DTD option in the New Document category of Preferences.

  7. If you're working a CSS-based layout, choose where you would like to store the pre-design CSS layout rules from the Layout CSS list. Choose Add to Head if you'd like to embed the rules in the newly created document, Create a New File to put them in a new external CSS document, or Link to Existing File to append the rules to an existing CSS document.

  8. If you'd like to link or import one or more existing CSS external style sheets, click the Attach Style Sheet icon in the Attach CSS File section. You can attach as many external CSS style sheets as you'd like. If you'd like to delete one from the list, select it and click Remove (the trashcan icon).

  9. Click Create to create a new, blank document of the selected category/type.

If you want to create a new document based on a custom template, use the Page from Template—rather than the Blank Page—category. For more information on creating and using templates, see Chapter 28.

Note

To learn more about the CSS layouts available from the New Document dialog box, see Chapter 7, "Building Style Sheet Web Pages."

Creating a new default document

If you often create one type of document—HTML or ColdFusion files, for example—you can take advantage of Dreamweaver's default document feature to save yourself some document creation time and trouble. By using the techniques described in this section, you can open a new document of your default type (HTML, ColdFusion, and so on) with one quick keyboard shortcut—in other words, without having to work your way through the New Document dialog box.

To create a new default document, follow these steps:

  1. Choose Edit

    Creating a new default document
  2. Note the Show New Document Dialog On Ctrl+N (Command+N) option. Uncheck this box if you want Ctrl+N (Command+N) to create a new default document without showing the New Document dialog box; check it if you want Ctrl+N (Command+N) to show the New Document dialog box.

    Tip

    If you are a Windows user, no matter what Show New Document Dialog On Ctrl+N setting you choose, Ctrl+Shift+N always creates a new default document without showing the New Document dialog box.

  3. If desired, select a different option from the Document Type (DTD) list. When you're finished, click OK to close the Preferences dialog box.

  4. After you perform the preceding step, you're done. To create a new default document, simply press Ctrl+Shift+N (Windows only). If you turned off the Show New Document Dialog On Ctrl+N option, you can also press Ctrl+N (Command+N).

Note

If, when defining your site, you specified a server model to be used, the new default document is the file type that corresponds to that server model—despite the Preferences dialog box setting you have chosen.

Previewing Your Web Pages

When using Dreamweaver or any other Web authoring tool, it's important to frequently check your progress in one or more browsers. Dreamweaver's Document window offers a near-browser view of your Web page, but because of the variations among the different browsers, it's imperative that you preview your page early and often. Dreamweaver offers you easy access to a maximum of 20 browsers—and they're just a function key away.

Note

Don't confuse Dreamweaver's View Live Data mode with the Preview in Browser feature. With View Live Data, Dreamweaver can only show you an approximation of how your page will look on the Web. Not all aspects of your page—such as links and rollovers—are active. You need to preview and test your page in a variety of browsers to see how your page looks and behaves on the Web.

You add a browser to your preview list by choosing File

Previewing Your Web Pages
  1. Choose File

    Previewing Your Web Pages
  2. To add a browser (up to 20), click the Add (+) button and fill out the following fields in the Add Browser dialog box (see Figure 5-17):

    • Name: When you choose the browser application, Dreamweaver automatically provides a name for the browser. You can accept this name, or change it by typing a new name in the Name field.

    • Application: Type in the path to the browser program or click the Browse button to locate the browser executable (.exe) file.

    • Primary Browser/Secondary Browser: If you want, select one of these checkboxes to designate the current browser as such.

      It's best to leave the Name field blank until you choose the browser executable in the Application field; Dreamweaver automatically fills in the name and removes any previously entered value.

      Figure 5-17. It's best to leave the Name field blank until you choose the browser executable in the Application field; Dreamweaver automatically fills in the name and removes any previously entered value.

  3. After you add a browser to your list, you can easily edit or delete it. Reopen the Preview in Browser Preferences category and highlight the browser you want to modify or delete.

  4. To alter your selection, click the Edit button. To delete your selection, click the Remove (–) button.

  5. After you finish your modifications, click OK to close the dialog box.

After you add one or more browsers to your list, you can preview the current page in these browsers. Choose File

It's best to leave the Name field blank until you choose the browser executable in the Application field; Dreamweaver automatically fills in the name and removes any previously entered value.

In order to view any changes you've made to your Web page under construction, you must select the Preview in Browser menu option again (or press one of the function keys for primary/secondary browser previewing, described in the following paragraph). Clicking the Refresh/Reload button in your browser does not load in any modifications. The temporary preview files are deleted when you quit Dreamweaver.

Tip

Dreamweaver saves preview files with a filename like the following: TMP5c34jymi4q.asp; a unique name is generated with each preview to ensure that the browser does not load the page from the cache. If Dreamweaver unexpectedly quits, these TMP files are not deleted. Feel free to delete any such TMP files you find in your site; or use them as backups to restore unsaved work should a crash occur.

You can also use keyboard shortcuts to preview two different browsers by pressing a function key. Press F12 (Option+F12) to preview the current Dreamweaver page in your primary browser, and Ctrl+F12 (Command+F12) to preview the same page in your secondary browser. These are the primary and secondary browser settings you establish in the Preview In Browser Preferences panel, explained in Chapter 4.

You can easily reassign your primary and secondary browsers. Go to the Preview in Browser Preferences category, select the desired browser, and select the appropriate checkbox to designate the browser as primary or secondary. In the list of browsers, you see the indicator of F12 (Option+F12) or Ctrl+F12 (Command+F12) appear next to the browser's name.

Tip

In addition to checking your Web page output on a variety of browsers on your system, it's also a good idea to preview the page on other platforms. If you're designing on a Macintosh, try to view your pages on a Windows system, and vice versa. Watch out for some not-so-subtle differences between the two environments in terms of color rendering (colors in Macs tend to be brighter than in PCs) and screen resolution.

Putting Your Pages Online

The final phase of setting up your Dreamweaver site is publishing your pages to the Web. When you begin, this publishing process is up to you. Some Web designers wait until everything is absolutely perfect on the local development site and then upload everything at once. Others like to establish an early connection to the remote site and extend the transfer of files over a longer period of time.

I fall into the latter camp. When I start transferring files at the beginning of the process, I find that I catch my mistakes earlier and avoid having to effect massive changes to the site after everything is up. For example, in developing one large site, I started out using mixed-case filenames, as in ELFhome.html. After publishing some early drafts of a few Web pages, however, I discovered that the host had switched servers; on the new server, filenames had to be entirely lowercase. Had I waited until the last moment to upload everything, I would have been faced with an unexpected and laborious search-and-replace job.

Transferring with FTP

After you've established your local site root—and you've included your remote site's FTP information in the setup—the actual publishing of your files to the Web is a very straightforward process.

Putting and getting files to and from your server, while easy, can be incredibly time-consuming. Dreamweaver frees its users from the drudgery of waiting for files to transfer through its background FTP feature. Uploading and retrieving files is a separate computer process in Dreamweaver, distinct from working in Design and Code view. When you initiate a publishing event, the Background File Activity dialog box with a small progress bar appears, as seen in Figure 5-18. You can dismiss the dialog by clicking Hide; when hidden, file activity can be seen in the bottom of the Files panel. An ongoing log is shown when you click Details, and can be saved when the transfers have been completed by clicking Save Log.

Dreamweaver transfers files through a background FTP process so you can continue working while files are being published.

Figure 5-18. Dreamweaver transfers files through a background FTP process so you can continue working while files are being published.

To transfer your local Web pages to an online site, follow these steps:

  1. Choose Window

    Dreamweaver transfers files through a background FTP process so you can continue working while files are being published.
  2. In the Files panel, click the Connect button. (You may need to connect to the Internet first.) Dreamweaver displays a message box showing the progress of the connection.

  3. If you didn't enter a password in the Remote Info category when you defined the site, or if you entered a password but didn't opt to save it, Dreamweaver asks you to type in your password. When the connection is complete, the directory listing of the remote site appears in the Files panel.

  4. Click the Expand/Collapse button to expand the Files panel into its two-pane view: Remote pane on the left, Local pane on the right. In the Local pane (green icons), select the folder(s) and file(s) you want to upload—or, to upload the entire site, select the site folder (at the top of the list)—and then click the Put File(s) button, as shown in Figure 5-19.

    Use the Put File(s) button in the Files panel to transfer files, folders, and entire sites.

    Figure 5-19. Use the Put File(s) button in the Files panel to transfer files, folders, and entire sites.

  5. If Dreamweaver asks if you would like to move the dependent files as well, click Yes to transfer all embedded graphics and other objects, or No if you'd prefer to move these yourself. You can also select the Don't Ask Me Again checkbox to make transfers of dependent files automatic in the future.

  6. The Background File Transfer dialog box appears. Click Hide to hide the dialog box and continue working in Dreamweaver; click Details to see the files being transferred. If hidden, you can restore the Background File Transfer dialog box by clicking the globe icon at the bottom of the Files panel.

  7. After each file has successfully transferred, Dreamweaver places a checkmark next to its icon—provided that File Check In/Out is enabled in the site's Remote Info category.

  8. When you finish transferring your files, click the Disconnect button.

  9. If you'd like to store the log file, display the Background File Transfer dialog box (if necessary) and click Save Log.

Note

Dreamweaver provides an FTP Log panel that displays all your FTP file transfer activity (Puts, Gets, and so on). This panel is particularly useful for troubleshooting FTP transfer errors. For more information, see the next section, "Using the FTP Log Panel."

Remember that the only files you have to highlight for transfer to the remote site are the HTML files. As noted previously, Dreamweaver automatically transfers any dependent files (if you allow it), which means that you'll never forget to move a GIF again. (Nor will you ever move an unnecessary file, such as an earlier version of an image, by mistake.) Moreover, Dreamweaver automatically creates any subfolders necessary to maintain the site's integrity. Combine these two features to save substantial time and worry.

Warning

Be aware that Dreamweaver does not always know to include files that are used within scripts; you might need to upload these files manually.

Now you have made your site a reality, from the planning stages to the local site root and onto the Web. Congratulations—all that's left is to fill those pages with insightful content, amazing graphics, and wondrous code.

Using the FTP Log panel

Like all data transfers on the Internet, FTP file transfers sometimes go awry: Servers are busy or down, file/directory permissions are improperly set, passwords are misspelled, and so on. If you run into an FTP transfer problem with your Dreamweaver Put File(s) or Get File(s) command, you can use the FTP Log panel to find out exactly what went wrong.

The FTP Log panel displays all your FTP file-transfer activity. To display the FTP Log panel, first choose Windows

Using the FTP Log panel

FTP logs may seem complex and indecipherable, but the information they contain is invaluable for troubleshooting FTP errors. Figure 5-20, for example, displays the FTP log that results from Putting (uploading) a file to a remote server.

The FTP Log generates a blow-by-blow description of actions taken.

Figure 5-20. The FTP Log generates a blow-by-blow description of actions taken.

Summary

In this chapter, you learned some options for planning your Web site and what you need to do in Dreamweaver to initialize the site. As you plan your site and set up your servers, keep these points in mind:

  • Put as much time into planning your site as possible. The more clearly conceived the site, the cleaner the execution.

  • Set up your local site root in Dreamweaver right away. The local site root is essential for Dreamweaver to properly publish your files to the remote site later.

  • If you are creating a Web application, choose one server model per site and set it when you define your site. This step is needed so that Dreamweaver knows the type of server code to write.

  • Although necessary for many operations, you don't need to define a site to work with a Web page. If you have the required connection information, you can work directly with files on a server. Opening a file from a directly connected server copies the file to your local system; when you save the file, Dreamweaver automatically puts it back on the server and removes the local version.

  • Get started quickly with any of the 32 CSS-based layouts, available through the New Document dialog box.

  • Preview early, often, and with various browsers. Dreamweaver gives you quick function-key access to a primary (F12/Option+F12) and secondary (Ctrl+F12/Command+F12) browser. Check your pages frequently in these browsers, and then spend some time checking your pages against other available browsers and browser versions.

  • Establish an early connection to the Web and use it frequently. You can begin publishing your local site through Dreamweaver's Site window almost immediately.

In the next chapter, you learn how to use Dreamweaver to begin coding your Web pages.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset