- HTML By Example -

Chapter 5

What You Need for a Web Site


Although creating HTML pages is easily the most time-consuming part of building your Web site, another equally important part is figuring out how you're going to get those pages on the Web. You'll need Web server software, an Internet connection, a Web URL for your pages, and a system for organizing your pages and graphics. Depending on how you gain access and how complicated your site is, just getting your first page up on the Web can take a certain amount of planning.

Finding a Web Server

Before you can display your HTML pages on the Web, you'll need access to a Web server. This may already be taken care of for you, especially if you work with an Information Systems (IS) department in a larger corporation. If this is the case, you'll just need to know how and where to send your HTML files when you wish to update the site. Otherwise, you'll need to make some arrangements on your own.

It isn't terribly difficult to set up your own Web server—especially if you already have a high-speed connection to the Internet. If you access the Internet through an Internet service provider (ISP), you'll want to discuss this with them, though. More than likely they're willing to provide you with space on their Web server computers. If your Web site is a fairly small venture, or if you're not ready for a heavy investment in equipment, then using your ISP's Web server is a great (and very common) alternative.

What Is a Web Server?

In its essence, it's the job of a Web server to accept connections from Web browsers all over the Internet and, when requested, send them the HTML documents that are available from your site. This is done using the HTTP protocol discussed in Chapter 2.

A Web server is simply a computer with an Internet connection that runs software designed to send out HTML pages and other file formats (such as multimedia files) (see fig. 5.1). The server computer should have a relatively high-speed connection to the Internet (faster than any available modem connections, for instance) and be powerful enough to deal with a number of simultaneous connections from the Internet.

Fig. 5.1

WebSTAR Web server software running on a Macintosh computer.

Web server software generally requires a fairly robust operating system (like UNIX, Windows NT, or OS/2), although software is available for other versions of Microsoft Windows, and the Macintosh OS is a very popular choice for Web server computers. The software you use depends on your level of experience with Internet connections and various operating systems.

Speed of the Server

The other major consideration is how popular your Web site will be. The more hits, or connections, your Web server receives at one time, the more powerful the computer should be—and the faster your connection to the Internet. What do I mean by a fast connection?

Most Internet connections are measured in terms of bits per second (bps), which translates loosely as "how many bits of data can be transmitted across the Internet in a second." In computerese, it takes eight bits to make up one byte of computer information—and a byte is what is required to create a character of text.

The typical modem connection is 14,400 bps, which translates to roughly 1,800 characters (bytes) transfered every second. If a typical page of text contains 300 words, then, and each word averages 6 characters per word, this connection would yield roughly a page-per-second transmission rate. A 25-kilobyte (KB) file (such as a very small GIF file) would take about 14 seconds to transmit over this connection.

This doesn't sound terribly slow, until you start to take into account the idea that more than one connection might occur with the Web server. If ten people connect to our server over this connection, it will take ten seconds to complete the task of sending each of them a single page of data. If that page totalled 25 KB in size (that is, if it included graphics and other elements), it could take over 140 seconds to complete that same task.

If the typical well-designed Web page is between 30 KB and 50 KB in size, you can see that we're going to start running into problems with this type of connection. There's the potential for someone to wait a number of minutes between the transfer of each page they request on your Web site. If the average commercial break on television is three minutes, just think how annoyed your users are going to get.

Types of Internet Connections

So your server will need a faster connection. But how do you get one? If Internet access is available to you through your company's Local Area Network (LAN), you probably already have a high-speed connection. Ask around your IS department. If you're running a small business or home office, you won't have to worry about high speed if you make your Web pages available on your ISP's Web server.

If you're going to use your own Web server computer, though, you'll need a high-speed Internet connection that you can connect to that computer. Table 5.1 details some of the possible connections.

Table 5.1 Internet connection speeds and technologies

Connection Speed Connection Technology
14.4/28.8 Kbps High-speed modem
56 Kbps 56K leased line
64 Kbps Single–B-Channel ISDN
128 Kbps Basic Rate ISDN
up to 1.5 Mbps Primary Rate ISDN (U.S.)
1.5 Mbps T-1 dedicated line
45 Mbps T-3 dedicated line

The minimum for an acceptable Web server connection is probably a basic-rate ISDN (Integrated Services Digital Network) connection, which offers 128,000 bps connections to the Internet. ISDN technology uses your existing phone wiring to provide an enhanced, digital, telephone connection. Using a special network adapter card for your computer, you can use the ISDN line to dial an appropriately equipped ISP. You can also use the ISDN connection for regular telephone calls.

ISDN is a service of your local telephone company, and you should contact them for more information. Also be aware that emerging technologies such as cable modems (offered by your cable TV company) may be another high-speed alternative.

The basic-rate ISDN connection is still somewhat slow, depending on your Web site's traffic (that is, the number of visitors to your site). But it's also the most reasonably priced, generally falling between $50 and $150 a month for the ISDN line (from your local phone company), with $50 to $100 for the ISDN account (from your ISP), and $300 to $1,000 to purchase the ISDN equipment.

Relatively low-cost ISDN "modems" are becoming more common for both PCs and Macs in the $300 to $500 range.

A T-1 line is the typical connection for an ISP or a large business, and these lines generally cost thousands of dollars per month for Internet access, as do primary-rate ISDN connections. T-3 lines currently serve as the backbone of the Internet, and are generally only found connecting university, government, and supercomputing organizations.

Dealing with an ISP

For any sort of connection to the Internet, you'll probably need to deal with an Internet service provider. These companies offer dial-up and special high-speed connections to the Internet, as well as generally offering Web and other types of Internet servers for your use.

Looking for a provider for your Web page? With your Web browser, you can access some lists of ISPs around the country (and world) at http://thelist.com or http://www.yahoo.com/Business_and_Economy/Companies/
Internet_Services/Web_Presence_Providers/
which includes a listing of free Web page providers. You might also check with your current ISP for Web deals, and realize that many popular online services offer free or cheap Web space.

For the typical smaller Web site, you'll want to buy space on the ISP's Web site. Generally this will give you an URL that begins with the name of the ISP's host computer, but points to a special directory for your HTML pages, as follows:

http://www.isp.com/username/index.html

With most Web server programs, the default page that is first loaded is named index.html, so that's the name you'll use for the first page you'd like presented to users when they access your Web site.

Determining Costs

If you're looking for an ISP for your Web site (as opposed to using your company's computers or your current ISP), it's important to consider two factors. Most ISPs will charge you based on how much disk space your Web site consumes and how much throughput is registered for your pages.

Throughput can be seen as the average amount of information transferred from your site to a user multiplied by the number of users who access your Web site:

average amount of information X number of users = throughput

If, for instance, each user who accesses your site transfers an average of 50 KB, and 1,000 users access your site in a month, then your throughput for that month would be 5 MB of data. If your ISP charges $1 per megabyte of throughput, you'll be charged $5 (not including the disk space charges and any monthly fees the ISP may charge).

So why charge for throughput? If hundreds of people access your site at any given time, this means that many fewer people can access other services provided by the ISP, so they charge you more. Consider the scenario where everyone is downloading a 250 KB shareware program from your Web site, and over 10,000 people access your Web site in a month. This is approximately 2.5 gigabytes of data transferred, for which you might be charged $2,500 (at $1 per megabyte).

Look for Web sites that offer monthly maximums and special deals to avoid surprise bills for hundreds or thousands of dollars.

A sum of $2,500 is a little high for that sort of traffic, but it does make a good point—many ISPs will limit your site to a certain amount of data transferred or a certain number of visitors per month (for a particular price plan). To get past these limitations, you may have to opt for the next higher plan available from the ISP, or accept additional charges for extra throughput.

What You Need To Know

Once you've decided on an ISP that you feel is reasonably priced, you're ready to create your HTML pages and upload them to the server. To do all this correctly, though, you'll probably need to ask a few questions:

Organizing a Web Site

The most important thing to remember when organizing a Web site is how the server computer you're using will differ from the computer you use to create Web pages. This is because you'll need to know the exact path to HTML pages and multimedia files you use in creating your Web page. As we've seen before, an URL requires both a server name and a path statement to the file. This includes files that you've placed on your own Web server—so while you're creating your Web pages, you'll need to know where your files will eventually be.

Although there are a number of different ways to arrange a Web site, there are some rules of thumb to keep in mind. For the most part, any organization you create for your Web site files should be designed to make updating your pages easy in the future. If you have to move all your files around every time you change something on a Web page, you'll also be forced to change all the hypertext links on many other pages—and that can be incredibly time-consuming.

Let's look at a couple of different types of organization for Web sites:

Naming Your Files

We've already mentioned that file extensions are an important part of all the filenames you use for your Web site. Because other Web browsers may rely on the file extension to know what sort of document or file it is, you'll need to include the appropriate extensions with all your Web site files.

Your Web site will almost always begin with a file called index.html. Most Web server software programs will automatically load this page if the URL of your site is accessed without a specific path and file reference. For example, entering the following URL in your browser:

actually results in the URL http://www.sun.com/index.html being loaded in your browser. Your Web site's first page (whether it's a "front door" page or the first page of your site) should be designed with this in mind. If you plan to offer only Netscape-enhanced pages, for instance, you'll want to let your users know this on the index.html page.

The other consideration for naming your files is the organization you plan to use for your site. If you're using a single-directory organization, your filenames should be as unique as possible, and graphics and other files should probably have names that relate to associated Web pages. For instance:

about_company.html

about_header.jpeg

about_ceo_photo.jpeg

When possible, these names will help you determine which files are associated with which HTML pages when you go to update those files.

For graphics and other files that show up on multiple pages, you might want to come up with a memorable prefix, like gen_ or site just so you can easily replace these universal files when necessary.

Example: Organizing a Site

To create a reasonably sized site for my home-business Web site, I'm going to use the hybrid style of organization. I have three different sections on my site: About My Business, Services, and Samples. Each of these sections will have its own directory structure. Graphics will be in their own subdirectory, as will downloadable files that I'm including (see fig. 5.2).

Fig. 5.2

The directory organization for my site.

The directory names, then, will be as follows:

about_pages

service_pages

sample_pages

graphics

sample_files

Files and graphics are named for where they appear, unless they show up in multiple Web pages. For this site, the prefixes I'm using are as follows:

about_

serv_

samp_

gen_

index_

By naming files in this way, I'll be able to replace any graphics or update my sample files easily—without being forced to load each file or graphic to figure out what it is. Making the names as descriptive as possible (aside from the prefix) will help too, as in the following:

about_photo_me.jpeg

samp_resume1.doc

sampl_catalog_copy.txt

Updating Your Web Site

If you organize you site well, updating the site is simply a matter of replacing an outdated file with a new file using the same filename. For instance, if I wanted to replace the picture of me in the previous example, I'd simply name the new file about_photo_me.jpeg, and save it in the same directory. Now the associated Web page will load the new graphic without requiring any changes to the HTML codes.

You'll need to check with your company's IS contact or your ISP to figure out exactly how you'll update files. With an ISP, you can generally use an FTP program to put new files in your directory organization on the Web site. You might instead be required to use a UNIX-based shell account for you uploading. In either case, it's a fairly simple process.

Your Web space provider will require you to enter a username and password to gain access to the Web server, whether by FTP or shell account. Generally you will point your FTP server to the Web server itself (for instance, www.isp.com), unless the provider has created a mirror site to avoid direct access to the Web server.

A mirror site is generally an exact replica of a Web server's hard disk, but it is kept separate for security reasons. For instance, you might not be able to directly access your company's Web site files—but you can change a mirror of that Web server, and your changes will be handled by knowledgeable Internet specialists. Many companies prefer to isolate their Web servers from their corporate network so that important data is impossible to access from outside the company.

"Mirror" is more generally used to represent any more-or-less exact copy of an Internet server. The FTP site mirrors.aol.com, for instance, offers copies of nearly every shareware file available on other popular FTP servers around the world. This more users access to the same files at the same time.

After clearing the security procedure, you'll most likely be in your personal Web site's main directory. (If not, you'll need to use the cd command in UNIX or otherwise change directories in your FTP program.) From that point, you can update files using the Put command. Simply upload the updated files with the same names as the outdated files—in nearly every case, the old files will simply be overwritten. If you're using new files, upload them using the names and paths that your Web page links use to refer to them.

Summary

Before you can start showing the world your HTML pages, you'll need to find a Web server where you can store them. This server can be a corporate server, an Internet service provider or a computer you maintain yourself. In any case, it needs to run Web server software and have a high-speed Internet connection.

Once you've established where you're going to put your HTML files, you need to decide how you'll organize them. There are four basic ways to do this: in one directory, in directories organized by functions, in directories organized by file type, or a hybrid of the latter two. For larger sites, a hybrid is most effective.

An important part of your Web site organization is the way you name files. The best way to do this is to be as descriptive as possible, while using name prefixes that best describe what Web pages are used to access these files. This will also help immensely when it's time to troubleshoot your Web site or update some of the files.

Review Questions

1. True or false? You'll need an extra, very powerful computer if you expect to have a Web site on the Internet?

2. Aside from the computer itself, what two basic things does a Web server require to operate?

3. If bps stands for bits per second, what does Kbps stand for? How is this different from Mbps?

4. How can you find out if ISDN phone service is available in your area?

5. What is throughput? Why do some Internet service providers charge based on throughput?

6. If your Web server runs the MS-DOS operating system, what are your filename limitations?

7. Explain the hybrid style of Web site organization.

8. The file about_ceo_photo.jpeg is most likely what sort of file? What might the HTML page that it is linked to be about?

9. What is the FTP command for uploading files over the Internet? Does "uploading" mean you're currently sending the file or receiving the file?

Review Exercises

10. Once you have a Web site available to you, test it by creating a text file called text.txt. (Just use WordPad, SimpleText, VI, or a similar text editor and type something in this file.) Then, upload the file to your Web server. Once it's there, use your Web browser to access it, using the appropriate URL. An example might be http://www.webcom.net/tstauffer/text.txt. Once you get it to appear in your browser, you'll know you're on the right track!

11. Create a special hierarchy of directories on your own hard drive that mirror the type of organization you're going to use for the Web site. When possible, your lowest-level directory should be named the name as your directory on the Web server.

12. Access your ISP's other Web pages and, from the URLs, attempt to determine what OS the ISP is using for its Web server. (Is it Mac? UNIX? PC? This may be difficult, but not impossible to tell.) Once you've guessed, contact your ISP to figure out if you're right. Don't forget that you'll need to use that OS's naming conventions when you create your site.


| Previous Chapter | Next Chapter |

| Search | Table of Contents | Book Home Page | Buy This Book |

| Que Home Page | Digital Bookshelf | Disclaimer |


To order books from QUE, call us at 800-716-0044 or 317-361-5400.

For comments or technical support for our books and software, select Talk to Us.

© 1996, QUE Corporation, an imprint of Macmillan Publishing USA, a Simon and Schuster Company.