GGI and Java


CGI

Overview

Common Gateway Interface. HTML only supports the display of static pages. In order to make a browser interactive (i.e., you enter a command, or some data, and the server returns information appropriately), it must be able to execute programs on the server. A good example of this are search engines: you enter keywords, which the http server passes to a external program that 1) selects hits from a database and 2) generates the html page to display to you. CGI executes programs on the server, not on your computer.

Example

This displays the number of times this page has been hit:



It works by executing the program counter.exe that 1) increments a page counter, 2) constucts a gif graphic of this value, which it returns. Examine view source to check it out.

Java

Overview

Java is a language similar to c++ that allows applications (called applets) to run on the client (i.e., your) computer, provided your browser is java enabled, and it is turned on (it can be turned off by selecting options in Netscape) It has become extremely popular tool. It is unique in that the java code will run on practically any computer, which makes development much easier. Its disadvantages are 1) it is currently an interpreted language, so it runs slow, 2) there are obvious security risks, since the program executes on your computer.

Example

All animated icons an graphics you see in WWW pages are animated by java. An example of a "mouse chase" can be found here. I will try to update this page in the future to actually include some useful (or interesting) java applets.