Establishing a Dreamweaver Site


Before you can begin developing your pages in Dreamweaver, you need to set some parameters regarding the location of your files, the primary file platform in which you will be working, and the location of the testing server (if any). This process, known as defining your Dreamweaver site, helps Dreamweaver ensure that your hyperlinks function properly and that code generated by the application is created in the correct language.

Dreamweaver uses the concept of the site to organize the files in your website into a logical structure so that it can understand the relationships between the files as well as the objects that are contained within those files. For instance, to ensure that you don't have any broken images in your pages, Dreamweaver needs to know where you will be locating your images so it can ensure that that a proper path is created to an image when it is inserted into your page. Other functionality, such as database connections and cascading style sheets, also rely on the site structure.

In addition, defining your Dreamweaver site enables you to more easily manage the pages, assets, and objects that make up your site. Then, as the number of sites you manage grows, you can easily switch between the sites and Dreamweaver will automatically adjust its configuration based on the settings for each specific site.

Note

To develop in Dreamweaver, you don't necessarily have to have a remote host or even a web server set up. While you are developing, you can use your local workstation as a testing machine. The only exception is users with the Windows XP Home Edition operating system. This version of the software does not contain built-in web services and, therefore, cannot serve web pages.


Defining the Site Locally

The first step in creating your local Dreamweaver site is to create the folder structure that will store your files, images, media files, and supporting documents such as PDF files. Depending on the operating system you are using, you need to create a new folder in the root directory of your web server. If you have already worked through the Fireworks section of this book, you probably have already created a folder called retroscycles in the WWWRoot folder on your hard drive. If you skipped ahead to the Dreamweaver section, now would be a good time to create the retroscycles folder.

After your directory structure is in place, the next step is to define your Dreamweaver site. To define a site, open Dreamweaver and choose Site, New Site from the menu bar. Through the Site Definition dialog box, as shown in Figure 23.1, Dreamweaver offers a basic option and an advanced option for creating a site.

Figure 23.1. The Site Definition dialog box offers a basic and advanced option for defining your site.


The basic option is a simple wizard that asks you to complete questions that provide the bare essentials of information needed to create a Dreamweaver site. In the majority of cases, the information collected by the basic view is enough to begin development work. If you find yourself needing to configure additional features such as cloaking (discussed later in this chapter) or Design Notes, you can use the advanced feature to customize additional site settings.

Using the Basic tab, type Retros Cycles as the name for your new site and then type http://localhost/retroscycles as the HTTP address for the site if you are using IIS as your web server or http://localhost/retroscycles:8500 if you are using Coldfusion as your web server. Using the localhost address enables you to test your pages on your local workstation. After you name your site, click the Next button. The next step in defining your site is to choose whether or not you intend to use a server technology to create database-driven pages. This example leverages the ColdFusion platform, so choose the Yes, I Want to Use a Server Technology radio button and then select ColdFusion from the drop-down menu that appears (see Figure 23.2). Click the Next button to continue.

Figure 23.2. Choose to develop the site with the ColdFusion platform.


The next step is to determine whether you will be developing and testing your pages on the local workstation, testing them locally and uploading them to a server, or creating and testing the pages directly on a server. In this case, the pages are created locally and tested on the local workstation, so select the first radio button and type the path (or browse) to the retroscycles folder you created on your local workstation (see Figure 23.3). Click the Next button.

Figure 23.3. Choose to create the pages and test them locally.


As shown in Figure 23.4, Dreamweaver asks you to confirm and test the URL that will be used to test your pages. Click the Test URL button. If you typed your URL correctly, you receive a confirmation that the URL test was successful. Click the Next button.

Figure 23.4. Enter the URL that will enable you to test your pages.


If you plan on copying your files to another server for production, the next step is to identify how Dreamweaver should access that server. Dreamweaver is capable of transferring files via FTP, across a local area network, via WebDAV, via RDS, and through Microsoft's Visual SourceSafe. The remote connectivity options are covered a little later. For now, choose the No radio button to indicate that you won't be using a remote server (see Figure 23.5). Click the Next button.

Figure 23.5. Choose not to use a remote server.


With the necessary settings established, Dreamweaver next supplies the basic summary of the site that you have created (see Figure 23.6). If any of the settings do not appear correct, you can click the Back button to progress backward through the steps to make corrections. To complete the site, click Done.

Figure 23.6. The summary displays the settings for your new site.


Note

You can always go back and edit the site in either basic or advanced mode if you find that you need to adjust fields or preferences. To access the site, choose Site, Manage Sites from the main menu.


When the Dreamweaver site is completed, you can access the site files, images, and objects via the Files panel shown in Figure 23.7.

Figure 23.7. You can now manage the content of your new site.


Creating the Best File Structure

With simple sites comprised of just a few pages and images, file structure isn't an area of extreme concern. However, when sites grow to contain hundreds, thousands, or even greater numbers of files, it becomes imperative to design a good file structure system to accommodate them.

The use of a local root folder is a good beginning. This area should contain top-level files such as the index page, as well as the main pages for the site. But if your site contains a great number of articles and resources, you might have to break this down into much greater detail. Let's say you publish an e-zine that regularly includes articles, columns, comics, and classifieds. It is in your best interest to create subfolders for each of these areas and keep things organized by topic.

Similarly, if you are using media other than images on your site, you might want to create subfolders for each type of media, such as images, audio, video, and so on.

The one potential problem that can arise out of creating too many subdirectories is that the resulting URLs can be very long, which makes them difficult to remember and bookmark and, depending on the way they are fashioned, even likely to cause problems with page validation.

A good exercise is to sketch out the file structure ahead of time. This gives you a blueprint from which to work as you proceed in the building of your site. Although it's not always easy to anticipate the future, keep in mind that the site, if successful, will grow in size and that the growth will need to be accommodated.


Setting the Remote Information

Now that you have your local site established, you might need to set up a connection to your remote server that enables you to transfer files between your local workstation and the server where your site is hosted. For instance, if Retro's Cycles has a web host that allows FTP transfers, you can configure Dreamweaver to easily update the pages stored on the web server with the changes made on your local workstation. Some details about the various remote connectivity types are available in Table 23.1.

Table 23.1. Remote Information Options

Option

What It Does

None

Select this if you want to build your site on just your local computer. You can always consider transfer options later.

FTP

This is the File Transfer Protocol, which is a widely used method of transferring files between a local machine and a remote machine.

Local/Network

If you are working on a network or running web server software locally, select this option.

WebDAV

Certain servers use the web-based Distributed Authoring and Versioning tools. If you are using a WebDAV system, select this option.

RDS

This is Remote Development Services, which is used by people working with dynamic content in ColdFusion.

SourceSafe Database

This is a special Microsoft database that enables powerful management features for teams working on sites. SourceSafe must be installed and in use if you want to use this option.


To demonstrate how these types of connections are configured, let's take a look at the FTP protocol because it is one of the most popular. To set up FTP, you need to obtain the following information:

  • FTP hostname

  • Login name (this is your user ID information)

  • Password (this is a password selected or provided to you by your service provider)

  • Any additional information provided by your service provider regarding required settings

Typically, your service provider configures your login to default to the remote root folder. This folder corresponds to the local root folder because it is the folder where the top-level documents and the subdirectories can be found.

With your FTP information in hand, you can add FTP functionality to your site by choosing Site, Manage Sites from the menu bar. In the Manage Sites dialog box (see Figure 23.8), select the site to which you want to add FTP functionality and click the Edit button.

Figure 23.8. Highlight the appropriate site in the Manage Sites dialog box and click Edit.


Next, click the Advanced tab and choose the Remote Info category, shown in Figure 23.9. Change the Access drop-down to FTP and enter the appropriate host information, login ID, and password. If your host requires additional settings, you can configure them via this dialog box as well.

Figure 23.9. Enter the appropriate FTP information required to access your site.


Two other options on the dialog box are worth mentioning:

  • Automatically Upload Files to Server on Save If you check this option, Dreamweaver automatically transfers the site to the remote server whenever you save the site. Because this can actually upload files that are in the process of being edited, I don't recommend choosing this option unless you are using an external versioning system such as SourceSafe.

  • Enable File Check-in and Check-out If you want to enable this feature, click once in the check box. The advantage of enabling this feature is that if multiple people are working on the site, Dreamweaver helps manage team files to prevent overwriting and the need for additional edits.

To complete the addition of FTP connectivity, click the OK button and Dreamweaver is configured for FTP access. However, because you probably don't have an extra FTP host handy at this time, click Cancel.

You can connect to and manage the files on your remote site by opening the Files panel (Window, Files), selecting your site from the list, and clicking the Connect button shown in Figure 23.10.

Figure 23.10. Clicking this icon connects you to a remote site. When you are connected, clicking it again disconnects you.


Cloaking Specific File Extensions

The cloaking feature is another site feature that can make managing your files easier in Dreamweaver. Cloaking enables you to choose which files are displayed in the Files panel and hide files that you wouldn't necessarily use in Dreamweaver. For instance, when the site images for Retro's Cycles were created in the Fireworks section, all the PNG files were also saved. Although it's great to keep the PNG files for future editing of those images, they won't be used in the Dreamweaver site, so it's not necessary to display them in the Files panel.

Tip

If you are managing a team of developers, the cloaking feature is a handy tool to hide specific file types from the team members to prevent tampering.


To hide them, cloak them from view by opening the Manage Sites dialog box (Site, Manage Sites), selecting the Retro's Cycles site, and choosing Edit. Switch to the Advanced view and select the Cloaking category shown in Figure 23.11.

Figure 23.11. Open the Cloaking category in the Site Definition dialog box.


To cloak a specific type of file, check the Enable Cloaking check box and then check the Cloak Files Ending With check box. Type .png in the text box to hide all PNG files and click OK. Dreamweaver re-creates the site cache and excludes all images ending with the .png extension.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net