
As you will see in this chapter, by simply establishing a reference (defining a site) between Dreamweaver and the site files on your computer, Dreamweaver greatly expands its feature set to include functionality to help you manage your web pages and websites. You can work with the examples in this chapter by downloading the files from www.dreamweaverunleashed.com. You'll want to save the files for Chapter 4 in an easy-to-find location. I'll place mine in C:\Dorknozzle\Chapter04. For this chapter, three files (helpdesk.htm, employeestore.htm, and admin.htm) have been added to the list. Although these files are basically empty, they will help us work with the examples in this chapter better. The Importance of Defining Sites in Dreamweaver As I briefly highlighted in the introductory paragraph of this chapter, site management, beginning with defining a site, presents numerous benefits to a developer. But you still may be asking yourself, "Why do I need to manage a site within Dreamweaver? I can manage my site within the file browser included with my operating system." To a certain extent, this is true. However, the significance and importance of managing a site within Dreamweaver's framework goes far beyond simple drag and drop to include the following features: A clean method of organizing content and assets. Managing a site within Dreamweaver begins with defining a site (discussed in the next section). Once you've defined a site, Dreamweaver cleanly organizes your files within the Files panel. As you can see in the sample site shown in Figure 4.1, the Files panel can organize design notes, assets, images, media files, scripts, library items, templates, and at the root of the directory, web pages. Figure 4.1. The Files panel cleanly organizes files. NOTE It's important to mention that a certain level of effort is required by you in terms of document structuring. While Dreamweaver will create the Notes, Templates, and Library folders for you, you're responsible for creating the rest. In the previous chapter, we didn't define a site. Instead, we had to navigate the entire directory structure to work with our files. By defining a site, Dreamweaver conveniently isolates the folder referenced when the site was defined. A site cache, which guarantees link integrity: Once you've defined a site, a reference is established between Dreamweaver and the files on your computer. Dreamweaver then takes a snapshot of those files and caches them. Because Dreamweaver now remembers the organizational, link, and path makeup of your files, if changes are made that break that structure, Dreamweaver automatically detects the changes, alerts you of them, and then fixes them, if you so choose. A built-in FTP client: One of the most common questions asked by beginning developers is "After I've finished developing my web pages in Dreamweaver, how do I upload them to my web hosting provider so that everyone can see them?" The answer to this question is simple. Dreamweaver provides a built-in File Transfer Protocol (FTP) client you can use to easily drag and drop files from your local