.

  D y n a m i c   W e b   P a g e s  

CPT 105 · Franklin College · Erich Prisner · 2002-2007

Nowadays most web pages contain something dynamic or moving. The technology responsible for this (scripts) can be classified by whether the action takes place on the client computer or on the server computer.

Client-side scripts

Javascript

A small and relatively easy-to-learn programming language, developed by Netscape. Javascript is the base of DHTML (dynamic HTML). These programs are written either directly on the HTML page, or on a separate page that the server sends together with the HTML page.

Why is Javascript easy? Firstly, many features of more serious programming languages are missing. Secondly, javascript refers to some existing webpage, has also already an interface. Still Javascript allows you to do nice things. Have a look on Javascript in action.

Microsoft has an own version: JScript.

Java applets

Java is a relatively new, very powerful programming language developed by Sun (has almost nthing to do with Javascript). Java "applets" are small applications that are sent to the client together with the web page. Usually these programs allow the user to interact with the page. The clock on the previous page is an applet (provided by the inventors of Java). The changing of the picture, on the other hand, is done by Javascript. See my soccer applet, as an example of a larger Java applet.

ActiveX

The Microsoft competitor to Java applets. May be written in many programming languages, mostly however in Visual Basic. Uses however special Windows features, therefore doesn't mix well with other operating systems. Since ActiveX programs have more rights on your computer than Java applets and can do almost everything, some people consider them to be potentially more dangerous than Java applets.

Cookies

Data created on the client's computer by Javascript programs, however in a very controlled form (space, form restrictions, and the browser decides where to place them). If you visit the website later, the javascript program may use the information.

Browser Settings

Be sure to choose the settings (Tools-Internet Options-Security for Internet Explorer---there you distinguish between four site categories) balancing safety and freedom best

Server-side Scripts

In the above case of applets on the browser side, the server has no idea how the browser interacts with the programs the server provided. If the browser is expected to respond some information to the server, programs have to run on the server. See a CPT106 page for more information on server-side scripts.