Considering Site Organization
There are many opinions about the proper way to organize a website. Some people like to compartmentalize all the files into directories and subdirectories. Some people like to have a very shallow structure, with many files in a single directory. As you get more experienced at web development, you'll find your ideal method of organization. It's nice to exchange ideas with other web developers or hobbyists so that you can learn from the successes and failures of others and they can learn from yours.
I have a Projects directory on my hard drive, represented in Figure 3.7. The Projects directory contains a directory for each project on which I'm working. Within each project directory is a Web directory. This is the directory where I keep all the development files for the site and the directory that I set as the root in Dreamweaver.
Figure 3.7 An example of a directory structure in which the website is housed in the directory.
This directory structure enables me to put other files, such as correspondence, contracts, invoices, and spreadsheets, in the client's folder without making them part of the website. It's good practice to keep other files separate from those you plan to transfer to the Web. You might prefer to have one directory that contains all your websites. Do whatever works best for you.
Put some thought into how you'll organize the files in your website before you start a project. You probably want to create a separate images folder to hold your images. If you have other types of assets, such as sound or video, you might want to create separate folders for those too. I always create a styles directory to hold external Cascading Style Sheets files; you explore these in the later hours of this book.
I try to logically break up sections of websites into separate directories. If your website has obvious divisions (departments, lessons, products, and so on), you can create directories to hold the web pages for each division. You'll be surprised at how even a small website becomes quickly unmanageable when all the files are dumped into one directory.
Most websites use many image files. If you have different sections in your website, do you want to have separate images directories in each section? It might be a good way to organize your site. Then again, if images are used across multiple sections, it might make the images hard to find. Make sure that your organizational logic isn't going to break down as you add files to your site.
Luckily, if you do have to rearrange assets, Dreamweaver updates any links for you. When you move a file, Dreamweaver asks you whether you want to search and update links to that file. That's what the site cache is created for. However, it is still best to make wise design decisions at the beginning of a big project .