Creating a Local Site in Macromedia Dreamweaver 8
- Creating a Dreamweaver Site
- Using the Files Panel
- Summary
- Sample Questions
IN THIS CHAPTER
Creating a Dreamweaver Site
Using the Files Panel
Summary
Sample Questions
Macromedia Dreamweaver enables you to develop and deploy your Web sites according to development best practices. As with any programming paradigm, it is recommended that you develop files in an environment separate from which a user can access. This enables developers to make changes to a site without any downtime and allows full testing prior to deploying new files.
Best practices suggest that you create your Web pages using the following three environments:
- A development server on which only Web site developers have access to the pages. These pages often are works in progress.
- A staging or test server on which members of a Quality Assurance team can test the pages with the assurance that the pages won't change in the middle of a test.
- A production server on which users are able to browse the end result Web site.
Dreamweaver supports the creation of all three types of environments. It all begins with the definition of your site.
Creating a Dreamweaver Site
In Dreamweaver, the term site refers to a location of a Web site's files and subfolders. It can refer either to a live Web site or to a local storage location for copies of the files belonging to a Web site. To create pages in a development environment, you are encouraged to create a local site, although it is not required.
A local site in Dreamweaver is simply a folder on your hard drive under in which your development work for a Web site will take place. This top-level directory is also known as a root directory.
Folder Organization
When planning your Web site, take the time to design your folder hierarchy. Some subfolders you may want to define under your root folder include the following:
- A folder, perhaps for each section of your Web site, as defined by your main navigation bar.
- One /images folder to contain images for the entire site, or a /images folder under each section folder.
- Folders for other types of asset files, such as Flash movies, sounds, or videos.
You can create this folder hierarchy outside of Dreamweaver and set it as your local site, or you can define a local site and use Dreamweaver to create the subfolders for you.
Managing Sites
To manage sites within Dreamweaver, select Site > Manage Sites. The Manage Sites dialog allows you to perform the following operations:
- Create a new site
- Edit an existing site
- Duplicate site
- Remove site
- Export site
- Import site
If you have a site definition that is similar to another site you want to create, you can select that site and create a duplicate by clicking the Duplicate button. You can then alter the site definition, such as redirecting to a new local root folder.
Dreamweaver enables you to export your site definition into a special file with a .ste extension. You can then share your site definition with other developers by allowing them to import the .ste file to recreate the site on their machines.
Creating a New Site
You can choose to create a new site in two ways:
- Select Site > Manage Sites and then select New > Site
- Select Site > New Site
You will get two choices for creating your sites when you click New:
- Site
- FTP (File Transfer Protocol) & RDS (Remote Development Services)
The second option, FTP & RDS, enables you to bypass the creation of a Dreamweaver site in order to connect to a remote server and quickly modify the files. When you create a new Site, you will be able to set up your Dreamweaver site in the resulting Site Definition dialog using either Basic or Advanced mode.
- Use the Basic mode to set up your entire site definition using a wizard.
- Use the Advanced mode to set up your entire site or parts of your site, or to quickly make modifications to your site setup.
Table 3.1 shows the properties for a local site definition in the Advanced mode.
Table 3.1. Settings of a Local Site
SETTING |
DESCRIPTION |
Site Name |
This should be set to a unique name that is meaningful to your Web site. It does not appear in the browser and is used only for your reference. |
Local Root Folder |
Specify the folder on your hard disk in which site files, templates, and library items will be stored. If the local root folder does not yet exist, you can create it using the file-browsing dialog box. |
Refresh Local File List Automatically |
This option indicates whether to automatically refresh the local file list every time you copy files into your local site. Deselecting this option results in better performance when files are added, but. you will then have to manually refresh the Files panel. |
Default Images Folder |
This attribute value contains the file path to a central directory of images for the site. If you set this value, any image that you bring in from outside the Web site will be copied into this folder. For example, when you drag an image from your desktop into an active document, Dreamweaver adds that image to the current site in the default images folder. |
HTTP Address |
This attribute value contains the URL that your completed Web site will use so that Dreamweaver can verify links within the site that use absolute URLs. |
Case-sensitve links |
This setting indicates to Dreamweaver that all link checking operations should compare links using the exact case. |
Cache |
Indicate whether to create a local cache to improve the speed of link- and site-management tasks (such as the use of the Site Map). If you do not select this option, Dreamweaver will ask you if you want to create a cache again before it creates the site. It's a good idea to select this option because the Assets panel works only if a cache is created. |
See Chapter 11, "Site Assets," for more information on the Assets panel.
Using the Site Definition dialog box, you can also specify a remote site, which is the intended production server and file path used for a working Web site.
See Chapter 17, "Transferring Files to Remote Servers," for more information on remote sites.
Local Site Benefits
Dreamweaver enables you to create individual Web pages, but there are many bene- fits to grouping these pages into a local site, including:
- The capability to update links to a page automatically when you move it within the site structure.
- All folders and files under the local site are displayed using the Files panel. The Files panel enables you to create, maintain, and deploy your Web site.
- When files are ready for testing or deployment into production, you can do so using FTP.
- Modifications to files can be uploaded to the production server, which keeps track of the files that have changed and need to be redeployed.
- Files maintained within a local site can be collaboratively shared among developers.