Planning and Defining a Project in Studio MX 2004
You use Dreamweaver's Files panel to plan, create, and manage projects. You might have created only a single Web page so far, but eventually you'll have lots of files: HTML files, image files, and maybe other types of files. It's important that you define your Web site so that Dreamweaver knows how to set links properly. Defining a new site should always be your first step when you start working on a new project.
Defining a New Web Site
Every Web site has a root directory. The root of a Web site is the main directory that contains files and other directories. When you define a Web site, Dreamweaver considers that directory and all the files within it to be the entire "universe" of that particular Web site. If you attempt to insert an image from outside this universe, Dreamweaver will prompt you to save the file inside the Web site.
Dreamweaver isn't overly controlling, though! The program needs to define the internal realm of your Web site so that it knows how to reference other files. For instance, if an image is located in an images directory within the site, Dreamweaver knows how to properly reference the image within a Web page. If, however, the image is somewhere outside the defined site, Dreamweaver may not be able to reference it properly, and you might end up with bad links in your Web site. You'll learn more about how Dreamweaver links to files in Chapter 4, "Setting Lots O' Links: Hyperlinks, URLs, Anchors, and Mailto Links."
You need to define a new Web site for every project you create. Even when projects are related, you might decide to break them down into smaller sites so that the number of files isn't unwieldy in a single site. For instance, I create e-learning applications, courses that people can take over the Web. When I'm working on a project, I often break individual lessons of a course into separate defined sites. When I need to work on Lesson 1, I open that site, and when I need Lesson 2, I open it. You can have only a single site open in Dreamweaver at one time.
Make sure that the Files panel is visible in Dreamweaver. After you've defined a Web site, you'll see a list of the files in the Web site displayed in the Files panel. Prior to defining your first site, you'll simply see either the Windows Desktop or the Macintosh Finder in the Files panel. If you don't have any site defined yet, click the Manage Sites link at the top of the Files panel to open the Manage Sites dialog box. If you already have sites defined in Dreamweaver, you'll see a list of them in the drop-down menu at the top of the Files panel. You can open the Manage Sites dialog box from the command at the bottom of this list.
You use the Files panel to open individual Web pages in Dreamweaver to work on. The file structure of a Web site is displayed in the Files panel, and you double-click Web pages in this panel to open them to edit them in Dreamweaver. Although it's best to always define a Web site, if you are just making a quick change to a single Web page, it'll be quicker for you to open the file without going to the effort to define a site. You open a single Web page by using File, Open.
The Manage Sites dialog box, shown in Figure 3.1, is where you can create, edit, duplicate, remove, export, and import Dreamweaver site definitions. The title says it all: This is where you manage your Web sites! To begin, click the New button in the Manage Sites dialog box and choose Site. The Site Definition dialog box appears.
Figure 3.1 The Manage Sites dialog box lists all the Web sites you have defined and enables you to manage them.
The Site Definition dialog box is where you name your site and point Dreamweaver to where the files are stored on your computer. You can define a site even if you don't have any files; you simply define the site in an empty directory that is ready to hold all the Web pages you create. The Site Definition dialog box, shown in Figure 3.2, has two tabs at the top: Basic and Advanced. You'll begin by using the settings on the Basic tab, so make sure that tab is selected. The Basic tab contains the Site Definition wizard, which walks you through the site definition. You can always go back and change or update your site if you need to.
Figure 3.2 The Basic tab of the Site Definition dialog box walks you through setting up a site definition.
The Site Definition wizard has three main sections, shown as the section names at the top of the wizard:
Editing FilesThis section helps you set up the local directory where you'll work on the Web site. You tell the wizard whether your site uses server-side technologies. None of the sites or Web pages in this book use these technologies, which connect Web pages, servers, and often databases.
Testing FilesThis section is needed only for sites that use server-side technologies.
Sharing FilesThis section enables you to tell Dreamweaver how you want to transfer files to a server or another central location to share. You'll explore this functionality in Chapter 18, "Uploading Your Dreamweaver Project."