Last Modified: 1/29/08
  Computer Training
Client-Server Relationships



Credit: Samuel Zschokke

The relationship between client and server is the fundamental paradigm that determines the characteristics of computer languages on the web. The differences are played out in terms of:

  • How the languages are invoked
  • What resources and information they can access
  • What structures can be manipulated
  • How they interact with the user and system
  • The speed and predictability of their interactions


  • How the languages are invoked: server side languages live on the server and are typically invoked either by
    • a user pressing a submit button in the client browser HTML which transfers control to the server program along with any name-value pairs in the form associated with the submit button. Here is an simple example of such an HTML program and here is the simple server program that is executed by it
    • a user typing in a URL with the name of the server program optionally followed by a "?" and "name=value" parameters separated by "&"s. For example,
      http://site.location.type/my.cgi?p1=abc&p2=10
    • a user clicking on a #exec Server Side Include element in HTML which points to a server program

    In contrast, client side programs are initially stored on the server embedded in the HTML code but are transferred to the client browser and operate there for the remainder of the session. They may be activated just by the loading process, by "onLoad" commands, or by user actions such as moving or clicking the mouse.

  • What resources they can access: server side programs operate as normal user programs unless web administrators have imposed restrictions. Thus they can access all user programs, such as graphics and databases, system programs, Unix system variables, and a special set of variables associated with the web, including a limited amount of browser information.

    In contrast, client-side programs are almost entirely confined to the browser, except for accessing images and other client side scripts from the server, and cookies. However, they have almost full access to the structure and operation of the browser.

  • What structures can be manipulated: server side programs can manipulate any resources on the server that are accessible to any user program, and can also write (but not change) HTML (including embedded scripts), plain text, and images to the browser.

    In contrast, client-side programs can not manipulate anything on the server (they can read images and scripts but cannot write or change anything), or the client (except for cookies), except for the browser, where they have a great deal of control

  • How they interact with the user and system: server side programs cannot manipulate any information on the client browser: they can rewrite a browser image, but they cannot modify an existing one (although they can change the contents of graphic files)

    In contrast, client programs interact easily with the user, and in the case of DHTML, can move, modify, add, or replace virtually anything in the browser

  • The speed and predictability of their interactions: server side programs can only rewrite a browser page, not change anything on it, so interactions often require a good deal of modem traffic and are subject to the varying loads placed on the server

    In contrast, client programs can manipulate HTML elements down to the smallest level and are affected only by the activity on the client. Thus interaction is usally very swift, immediate, and predictable.

Previous Home Next

Course Topics

Client-Sever Relationships

Markup Languages

Properties of Web Languages

Client-Side Languages

Server-Side Languages

 
Previous Home Next

©1999 UW Technology