Article
Advanced Web Design: A Primer
Waiters and Customers: Clients and Servers
As I mentioned above, advanced Web design technologies may be divided into two broad categories: server-side and client-side. Understanding the difference between the two requires a basic understanding of what goes on when someone views a Web page on the Internet.
You’ve done it hundreds, if not thousands of times before. You’ve typed a Web address (URL) into your Web browser’s address field and it has loaded and displayed the corresponding Web page. But what’s really going on behind the scenes?
In the simplest sense, there are two computers involved in this process: your computer, where you Web browser is running, and the computer somewhere on the Internet that serves up the Web page in question. In this arrangement, your computer is known as the client and the computer providing the Web page is known as the server. Think of the server as a waiter in a busy restaurant, and the client as one of the customers clamouring for his attention. Just like in the real world, one server (or waiter) is responsible for fulfilling the requests of many clients (or customers).
In our busy restaurant, the waiter takes orders from the customers, and then brings them (hopefully) what they ordered. This is surprisingly similar to what goes on between the client and server computers on the Web. The client computer, as you know, runs a Web browser that allows it to view Web pages. This software, when provided with a Web address, sends a request for that address over the Internet to another software program running on the server computer. This program, known as a Web server, responds to that request by sending back the Web page corresponding to the address. It is then up to the browser to interpret that Web page, converting it into human-readable format and slapping it up on the client computer’s screen.
The retrieval and display of any Web page on the Internet proceeds along the same general lines I have just outlined; however, it’s not always quite as simple. Most advances in Web design lately have come with the cost of additional steps in the above process. Whether the additional steps come before or after the waiter hands the customer his order is the difference between client- and server-side technologies.
In most restaurants, the waiter isn’t the one responsible for preparing the food; that’s the cook’s job. The waiter just takes the order, and relays it to the cook. The cook prepares the order, and then gives it to the waiter to give to the customer. In a way, the cook assists the waiter in his work: giving the customers what they ask for. In the same way, the Web server software running on the server computer can have ‘helpers’ that let it do more than just serve up ready-made meals--err, Web pages. These helpers are server-side technologies for advanced Web design.
Now, when the customer finally gets his order from the waiter, the logical thing for him to do is eat it, right? But sometimes it’s not so simple. Consider, for instance, if the customer ordered French toast. Typically, he will also be given a little cup of maple syrup. If the customer were to just eat his meal as-is, taking a swig of maple syrup after every few bites of French toast, he might get a funny look or two. Instead, the customer is expected to spread the syrup on his toast before eating it – a small part of the task of preparing the meal has been left for the customer to do. By the same token, some Web pages are more complex for the browser to display than simply taking the HTML and converting it into a picture on the screen. Sometimes additional tasks must be completed by the Web browser for the Web page to be displayed. Anything that requires the browser to become a more active participant in determining what to display on the screen is a client-side technology for advanced Web design.