So every web page, we've learned, is created as a simple text document, incorporating HTML commands. There are four steps to turning web pages into a web site: Naming pages, organizing pages, and transferring them to your server. 4 steps from web page to web site:
naming web pagesEach page on your web site will have a unique web address (or URL), based on the name of its corresponding HTML file. There are a few rules about how web pages (and thus HTML files) should be named. 4 rules for naming web pages:
If you're developing a site with many pages, you'll want to create a system for naming them so you can organize and identify them more easily. Different people have different methods. For instance, if you have a page on your website with publicity information and press releases, you might name it press.html or company_press.html. It depends on what other pages you're naming and what feels right to you. Once you've decided on a system, though, you should stick with it. Your site will be more logical and manageable if your file names are consistent. organizing web pagesThe pages that make up your web site will be stored in a collection of files and folders similar to those that appear on your desktop computer (though perhaps more rigorously organized). The placement of any particular page within the hierarchy of folders and files will dictate its web address, or URL. So a web page whose URL appears like so: http://www.beardedman.com/beard_types/goatee/index.html comes from a file called "index.html," placed in a folder called "goatee," which is in another folder called "beard_types," which lives on a server called "WWW," which is registered to the domain "beardedman.com." Folder names follow similar rules as the individual files: They can't contain spaces, and they're case-sensitive so you have to pay attention to whether you're using uppercase or lowercase letters. The folder and file names on the server become part of the URL. So the file and folders above would appear as http://www.beardedman.com/beard_types/goatee/index.html.
Now, if you have a simple site with just a few pages, you can put all the pages (including the front door) in one folder. But if you have a more complex hierarchy of site sections and subsections, your directory structure, too, will be complex. The folders that contain your web pages (also known as your site's directory structure) should be organized to reflect your site's structure. So if you have five main sections on your site dogs, cats, birds, snakes, and hamsters your pages should be organized into folders with those names. For an overview of how to organize your site, try this Webmonkey tutorial: http://www.webmonkey.com/html/96/45/index2a.html. linking between pagesNormally, when you're linking to another page on the web, you include the complete URL of the page to which you're linking. (For a review of URLs, see understanding web addresses, p. 34. But if you're linking to a page on your own site, you can use a partial, or relative URL.
Relative URLs are easier and more efficient. Rather than giving the full address, they describe the location of the page in relation to the current page. So if you're linking from the front door of your site to another page that's in the same folder, you can just include its file name, like readings.html. For a complete explanation of relative URLs, try this Webmonkey tutorial: http://www.webmonkey.com/99/39/index3a_page3.html. transferring web pagesOnce you've created your pages, named them, and organized them into folders, you're ready to put them on the web. The task is pretty simple: You have to move the files from your computer to a server that's connected to the Internet. (See how web pages are served, p. 200.) The process will vary a little, depending on where your server is. If your company has its own server, you can transfer the pages on your local network. In most cases, you'll move the files to a "staging" server, and someone else the system administrator or the production director will move them to the live site. If you use a web host, you'll transfer the pages over the Internet and into your site's directory on the server. You'll do this with an FTP program (On the PC, try CuteFTP. On the Mac, try Fetch). FTP or file transfer protocol is a simple way of transferring files over the Internet. Basically, you choose the files on your computer that you want to move and specify the server you want to move them to. Before you can FTP your files, however, you'll need the server address and a user name and a password all of which your web host will supply. To learn more about FTP, try these Webmonkey tutorials:
FTP basics http://www.webmonkey.com/02/36/index4a.html FTPing with CuteFTP http://www.webmonkey.com/98/42/index2a.html FTPing with Fetch http://www.webmonkey.com98/41/index4a.html
serving "dynamic" pagesOn simple sites, the server's role is pretty straightforward. It stores a lot of web pages, waits for a request, and sends the selected page off to the web user. But few sites are so simple anymore. Rather than just serving pre-packaged "static" pages, many sites are serving customized "dynamic" pages which may say things like, "Welcome back, Jennifer! Check out the new Erasure CD!" and which require a lot more work on the part of the server:
What makes a web page dynamic isn't the content itself, but how it's created. A dynamic page is created on-the-fly by the server, once it's requested by the user. This gives the server a chance to make last-minute revisions, based on who's asking for the page. The level of customization varies. Depending on the site, the server may have to perform calculations before creating the page; it may have to draw information out of a database; or it may just chose from among several pre-packaged pages. Dynamic content may be based on
Dynamic pages are generally made possible by scripts (like those written in PHP or ColdFusion) that reside on and rely on the server. (See understanding php, p. 168.)
|