By Randy Ortiz,2014-10-09 07:07
14 views 0

----------------------- Page 1-----------------------

Working with Active Server Pages - Chapter 1

     Chapter 1

     Understanding Internet/Intranet Development

     This chapter was written for a special group of people: those who had an unusually good sense of timing and waited until the advent of Active Server Pages (ASP) to get involved with Internet/intranet development.

     The chapter surveys an important part of the ASP development environment: thepacket-switched network. You will learn what this important technology is and how it works inside your office and around the world. The chapter also is a

     cursory treatment of Internet/intranet technology; details await you in later pages of the book (see the "From Here..." section, at the end of this chapter, for specific chapter references).

     In this chapter you learn about:

     The hardware of the Internet

     First, look at the plumbing that enables your software to operate. One important Internet hardware feature affects how you use all of your Internet applications.

     The software of the Internet

     Learn about the software of the World Wide Web, as well as that of its poor relation, the OfficeWide Web.

     The protocols of the Internet

     Take a quick look under the hood of the Web (and anticipate a thorough treatment of Internet protocols in later chapters).

     Understanding the Hardware That Makes the Internet Possible

     The Internet is like one vast computer. It is a collection of individual computers and local area networks (LANs). But it is also a collection of things called routers, and other kinds of switches, as well as all that copper and fiber that connects

     everything together.

     Packet-Switched Networks

     Begin your exploration of this world of hardware by looking at the problem its

founding fathers (and mothers) were trying to solve.

     A Network Born of a Nightmare

     A great irony of the modern age is that the one thing that threatened the extinction of the human race motivated the development of the one thing that may liberate more people on this planet than any military campaign ever could.

     The Internet was conceived in the halls of that most salubrious of spaces: the Pentagon. Specifically, the Advanced Research Projects Agency (ARPA) was responsible for the early design of the Net's ARPAnet. ARPA's primary design

     mission was to make a reliable communications network that would be robust in the event of nuclear attack. In the process of developing this technology, the military forged strong ties with large corporations and universities. As a result,

     responsibility for the continuing research shifted to the National Science Foundation. Under its aegis, the network became known as the Internet.


     You may have noticed that Internet is always capitalized. This is because Internet is the name applied to only one thing-and yet, that thing doesn't really exist. What this means is that there is no one place you go to when you

     visit the Net; no one owns it, and no one can really control it. (Very Zen, don't you think? At once everything and nothing.)

     You also may have come across the term intranet and noticed that it is never capitalized. You can probably guess the reason: because intranets, unlike the Internet, are legion; they are all over the place. And every single one of

     them is owned and controlled by someone.

     In this book, you will see the term Web used interchangeably for both the World Wide Web and the OfficeWide Web. When this book discusses the Internet, Web refers to the World Wide Web; when it discusses intranets, Web

     refers to the OfficeWide Web.

     A Small Target

     Computers consist of an incredibly large number of electronic switches. Operating systems and computer software really have only one job: turn one or more of those switches on and off at exactly the right moment. The Internet itself is one

     great computer, one huge collection of switches. This is meant in a deeper way than Scott McNealy of Sun Microsystems intended when he said "The network is the computer." I think Scott was referring to the network as a computer. We

     are referring, instead, to the switches that make up the Internet, the switches that stitch the computers all together into an inter-network of computers. Scott was emphasizing the whole, we are highlighting the "little wholes" that make up

     Scott's whole.

     The reason this is important is fairly obvious. If you take out a single computer or section of the network, you leave the rest unphased. It works.

     So, on the Internet, every computer basically knows about every other computer. The key to making this work is the presence of something called the Domain Name System (DNS). You will learn details of this innovation in a moment; for

     now, just be aware that maintaining databases of names and addresses is important, not only for your e-mail address book, but also to the function of the Internet. The DNS is the Internet's cerebral cortex.

    file:///C|/e-books/asp/library/asp/ch01.htm (1 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 2-----------------------

Working with Active Server Pages - Chapter 1

     Ironically, the Net's distributed functionality is similar to the one the brain uses to store memory and the one investors use to diversify risk. It all boils down to chance: Spread the risk around, and if anything goes wrong, you

     can control the damage. This was the lesson lost on the designer of the Titanic.


     If it makes sense to use lots of computers and connect them together so that information can flow from one point to another, the same logic should work with the message itself.

     For example, take an average, everyday e-mail message. You sit at your PC and type in what appears to be one thing, but when you press the Send/Receive button on your e-mail client, something happens: Your message gets broken up into

     little pieces. Each of these pieces has two addresses: the address of the transmitting computer and the address of the receiving computer. When the message gets to its destination, it needs to be reassembled in the proper order and presented

     intact to the reader.

Fractaled Flickers

     Those of you interested in technically arcane

     matters might want to look at Internet/intranet hardware and software through the eyes of the chaologist-someone who studies the mathematics of chaos theory and the related mathematics of fractals.

     Essentially, all fractals look the same, regardless of the level of detail you choose. For the Internet, the highest level of detail is the telecommunications infrastructure-the network of switches that carries the signal from your

     computer to mine. Another level of detail is the hardware of every computer, router, and bridge that make up the moving parts of the Internet. (Guess what, the hardware looks the same for each.) You look at the way the

     information itself is structured and see that the family resemblance is still there.

     Someone should take the time to see if there's something important lurking in this apparent fractal pattern. Chaotic systems pop up in the darndest places.

     An Unexpected Windfall

     There is one especially useful implication to all this packet business. Did you know that you can send an e-mail message, navigate to a Web site, and download a 52-megabyte file from the Microsoft FTP site, all at exactly the same time?

     Remember that any single thing (a "single" e-mail message) to you is a multiplicity of things to your computer (dozens of 512 byte "packets" of data). Because everything gets broken up when sent and then reassembled when received,

     there's plenty of room to stuff thousands of packets onto your dialup connection (defined in the section entitled, "Connecting Your Network to an Internet Service Provider"). Let your modem and the Internet, with all its hardworking protocols (defined in the last section of this chapter) do their thing. Sit back, relax, and peel a few hours off of your connect time.

     Routers and Gateways

     Remember that the Internet is a global network of networks. In this section, you get a peek at the hardware that makes this possible. You also will see how you can use some of this same technology inside your own office.

     To give you some idea of how all this hardware is connected, take a look at figure 1.1.

    file:///C|/e-books/asp/library/asp/ch01.htm (2 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 3-----------------------

Working with Active Server Pages - Chapter 1

Figure 1.1

     An overview of the hardware that makes the Internet possible.

     Routers: The Sine Qua Non of the Internet

     Routers are pieces of hardware (though routers can be software added to a server) that are similar to personal computers on your network. The main difference is that routers have no need to interact with humans, so they have no keyboard

     or monitor. They do have an address, just like the nodes on the LAN and the hosts on the Internet. The router's job is to receive packets addressed to it, look at the whole destination address stored in the packet, and then forward the packet

     to another computer (if it recognizes the address).

    file:///C|/e-books/asp/library/asp/ch01.htm (3 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 4-----------------------

Working with Active Server Pages - Chapter 1

     Routers each contain special tables that inform them of the addresses of all networks connected to them. The Internet is defined as all of the addresses stored in all of the router tables of all the routers on the Internet. Routers are organized

     hierarchically, in layers. If a router cannot route a packet to the networks it knows about, it merely passes off the packet to a router at a higher level in the hierarchy. This process continues until the packet finds its destination.

     A router is the key piece of technology that you either must own yourself or must be part of a group that owns one; for example, your ISP owns a router, and your server address (or your LAN addresses) are stored in its router table. Without

     routers, we would have no Internet.

     Gateways to the Web

     The term gateway can be a confusing, but because gateways play a pivotal role in how packets move around a packet-switched network, it's important to take a moment to understand what they are and how they work.

     Generally speaking, a gateway is anything that passes packets. As you might guess, a router can be (and often is) referred to as a gateway. Application gateways convert

    data into a format that some kind of application can use. Perhaps the

     most common application gateways are e-mail gateways. When you send an e-mail message formatted for the Simple Mail Transfer Protocol (SMTP) to someone on AOL (America Online), your message must pass through an e-mail

     gateway. If you've ever tried to send an e-mail attachment to an AOL address, you know that there are some things the gateway ignores (like that attachment, much to your chagrin).

     A third kind of gateway is a protocol gateway. Protocols are rules by which things get done. When you access a file on a Novell file server, for example, you use the IPX/SPX protocol. When you access something on the Web, you use

     TCP/IP. Protocol gateways, such as Microsoft's Catapult server, translate packets from and to formats used by the different protocols. These gateways act like those people you see whispering in the president's ear during photo ops at

     Summit meetings.

     When you are setting up your first intranet under Windows 95 and/or Windows NT, you need to pay attention to the Gateway setting in the Network Properties dialog box. This is especially important when your PC is also

     connected to the Internet through a dialup account with an ISP.

     Getting Connected

     If all this talk about what the Internet is leaves you wondering how you can be a part of the action, then this section is for you.

     Wiring Your Own Computers

     The simplest way to connect computers is on a local area network, using some kind of networking technology and topology. Ethernet is a common networking technology, and when it is installed using twisted-pair wire, the most common

     topology is the star (see Figure 1.2) . Networking protocols are the third component of inter-networking computers (you will learn more about the defining protocol of the Internet in the last section of this chapter, "It's All a Matter of


    file:///C|/e-books/asp/library/asp/ch01.htm (4 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 5-----------------------

Working with Active Server Pages - Chapter 1

Figure 1.2

     The Star topology of Ethernet requires all computers to connect to a single hub.

     When you wire an office for an Ethernet LAN, try to install Category 5 twisted-pair wire. Wire of this quality supports the 100 megabyte per second (M/sec), so-called Fast Ethernet.

     With Ethernet's star topology, the LAN wires that are leaving all the PCs converge on one piece of hardware known as a hub. Depending on your needs and budget, you can buy inexpensive hubs that connect eight computers together. If

     your network gets bigger than eight computers, you can add another hub and "daisy-chain" the hubs together. Insert the ends of a short piece of twisted pair wire into a connector on each hub, and you double the size of your LAN. Keep

     adding hubs in this way as your needs demand.

     If you're like me and you occasionally need to make a temporary network out of two PCs, you can't just connect their Ethernet cards with a single piece of ordinary twisted-pair wire (but you can connect two computers with

     terminated coax cable if your network interface card has that type of connector on it). You need a special kind of wire that is available at electronics' parts stores.

     Each network adapter card in a computer has a unique address called its Media Access Control (MAC) address. You can't change the MAC address; it's part of the network interface card (NIC) that you installed on the bus of your PC. There

     are addresses that you can control, however. Under Windows 95, you can easily assign a network address of your choosing to your computer. You'll learn how to do this in the section entitled, "Names and Numbers."

     As you will see throughout this book, the single greatest advantage of the LAN over the Internet is bandwidth. Bandwidth is a term inherited from electronics engineers and has come to mean "carrying capacity."

The Several Meanings of Bandwidth

     Bandwidth, it turns out, is one of those buzzwords that catch on far beyond the domain of discourse that brought them to light. Today, bandwidth is used ubiquitously to describe the carrying capacity of anything. Our personal

     favorites are human bandwidth andfinancial bandwidth. One that we use-and that, to our knowledge, no one else uses-is intellectual bandwidth. Human and intellectual bandwidth obviously are related. The former refers to the

     number and the skill level of those responsible for creating and maintaining an Internet presence; the latter is much more specific and measures how quickly the skill-level of the human bandwidth can grow in any single

     individual. Intellectual bandwidth is a measure of intelligence and imagination; human bandwidth is a measure of sweat.

     Oh, yes, and financial bandwidth is a measure of the size of a budget allocated to Web development. It also can refer to a Web site's ability to raise revenues or decrease costs.

     Packets move across a LAN at a maximum of 10 million bits per second (bps) for Ethernet, and 100 million bps for Fast Ethernet. Contrast that with one of the biggest pipes on the Internet, the fabled T-1, which moves bits at the sedentary

     rate of 1.544 million bps, and you can see how far technology has to go before the Internet performs as well as the LAN that we all take for granted.

     Connecting Your Network to an Internet Service Provider

     Whether you have a single PC at home or a large LAN at the office, you still need to make a connection with the Internet at large. Internet Service Providers are companies that act as a bridge between you and the large telecommunications

     infrastructure that this country (and the world) has been building for the last 100 years.

     When you select an ISP, you join a tributary of the Internet. Certain objectives dictate the amount of bandwidth that you need. If you want only occasional access to the Internet, you can use a low-bandwidth connection. If you are going to

     serve up data on the Internet, you need more bandwidth. If your demands are great enough-and you have sufficient financial bandwidth-you need to access the biggest available data pipe.

     Connecting to the Internet through an ISP can be as simple as something called a shell account or as complex as a virtual server environment (VSE). If the only thing you want to do is access the World Wide Web, you need only purchase a

     dialup account. Of course, there's nothing stopping you from obtaining all three.

     I have two ISPs. One provides a shell account and a dial-up account. The other ISP provides my VSE. At $18/month (for the first service provider), having two access points to the Internet is cheap insurance when one of those

     ISPs goes down.

     You need a shell account to use Internet technologies like telnet (one of the book's authors uses telnet all the time to do things like check on due dates of books and CDs he's checked out of the Multnomah County Library or check a title at

     the Portland State University Library). We also use it to log onto the server where our many Web sites reside, so we can do things like change file permissions on our CGI scripts or modify our crontab (UNIX program that lets us do

     repetitive things with the operating system, like run our access log analysis program).

     Dialup accounts are modem connections that connect your PC to the modem bank at your ISP. Equipment at the ISP's end of the line then connects you to a LAN that, in turn, is connected to a router that is connected to the Internet. See

    file:///C|/e-books/asp/library/asp/ch01.htm (5 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 6-----------------------

Working with Active Server Pages - Chapter 1

     Figure 1.3 for a typical configuration.

Figure 1.3

     Here's an example of how all this equipment is connected.

     If you are using a modem to connect to your ISP, you may be able to use some extra copper in your existing phone lines. In many twisted-pair lines, there are two unused stands of copper that can be used to transmit and receive

     modem signals. If you use them, you don't have to string an extra line of twisted-pair wire just to connect your modem to the phone company. Consult your local telephone maintenance company.

     Currently, all the Web sites for which we are responsible are hosted by our ISP. This means that many other people share the Web server with us to publish on the Internet. There are many advantages to this strategy, the single greatest

     being cost-effectiveness. The greatest disadvantage is the lack of flexibility: The Web server runs under the UNIX operating system, so we can't use the Microsoft Internet Information Server (IIS).

     An attractive alternative to a VSE is to "co-locate" a server that you own on your ISP's LAN. That way, you get all of the bandwidth advantages of the VSE, but you also can exploit the incredible power of IIS 3.0. (By the time this book

     reaches bookshelves, that's what we'll be doing.)

     The Virtue of Being Direct

     Starting your Internet career in one of the more limited ways just discussed doesn't mean that you can't move up to the majors. It's your call. Your ISP leases bandwidth directly from the phone company, and so can you. All you need is

     money and skill. Connecting directly using ISDN (integrated service digital network) technology or T1 means that the 52M beta of Internet Studio will download in one minute instead of four hours, but unless you need all of that bandwidth

     all of the time, you'd better find a way to sell the excess.

     As you will see in the Epilogue, "Looking to a Future with Active Server Pages," choosing IIS 3.0 may, itself, open up additional revenue streams that are unavailable to you when using other server platforms.

     The Client and Server

     It's time to turn from the plumbing of the Internet and learn about the two most fundamental kinds of software that run on the it, the client and sever. In Chapter 3, "Understanding Client/Server Programming on the Internet," you'll see more

     details about the history and current impact of client/server programming on the Web. We introduce the concepts here, so you can see clearly the fundamental difference between these two dimensions, client and server, of Web


     Clients and servers come in many varieties. Within the Internet, the big three are e-mail, file transfer protocol (FTP), and the Web. Outside the Net, client/server database management systems (DBMS) are the most common. In

    file:///C|/e-books/asp/library/asp/ch01.htm (6 of 13) [10/2/1999 5:17:07 PM]

----------------------- Page 7-----------------------

Working with Active Server Pages - Chapter 1

     this section, we focus on the Web server and client.

     Web Servers: The Center of 1,000 Universes

     Whether on an intranet or on the Internet, Web servers are a key repository of human knowledge. Indeed, there is a movement afoot that attempts to store every byte of every server that was ever brought on-line. The logic is compelling,

     even if the goal seems daunting: Never before has so much human knowledge been so available. Besides being easily accessed, Web servers have another ability that nothing in history, other than books, has had: They serve both text and

     graphics with equal ease. And, like CDs, they have little trouble with audio and video files. What sets the Web apart from all technologies that came before is that it can do it all, and at a zero marginal cost of production!

     Originally, Web servers were designed to work with static files (granted, audio and

Report this document

For any questions or suggestions please email