Full-blown forms: forms are the visible HTML mechanism that permits people reading Web pages to provide information to the server, either by selecting among offered choices or by typing into blank fields. In general, the information provided by the user of a form is processed by a Common Gateway Interface ("CGI") computer program. In some cases, such as search engines, the resulting output is sent back to the browser as HTML, to be formatted for display. In other cases, such as a guestbook, the information may just be stored away for use by the publisher of the Web page.
Web-based applications: time-shared systems (e.g., Student Information System databases) traditionally provide user access to applications software through character-cell terminals. With the Web, we have the possibility for a much more robust approach, using the Web browser as a universal user interface. This has the nice feature that the application programmers can concentrate on their application without having to worry about what hardware or software the user prefers; HTML provides the lingua franca.
CGI scripting works well in a situation that will involve a modest number of simultaneous browsers. If too many people run the program at the same time, the server system will be brought to its knees, slowing down or even preventing the presentation of other web pages from that server.
The CGI program may execute on the server with the identity of the web server, in which case it will have access to a great many files on the system. In such a case, there will need to be appropriate precautions to ensure the integrity of the system.
The CGI program may execute on the server with the identity of the individual authorized user who wrote it. In this case, the CGI program will have access to all files on that server that are owned by that user, including any personal E-mail files that are kept on that system.
CGI scripting is much more robust with respect to variations among browsers. As such, it is especially well suited to applications that will be used by the general public.
Java has the advantage over CGI that the available resources for executing the program grow in exact proportion to the number of people running it, instead of being constant.
The disadvantages of Java include the following:
For applications that are intended to be used by a controlled audience ("intranet"), where you can be assured that a particular browser is installed (or at least readily available), this disadvantage is much reduced.
If the browser has been flawlessly written, it will enforce limitations on the running program ("it has to play only in its own sandbox") to prevent the Java program from doing anything nasty. Many people who have Java-capable browsers will configure them to leave Java turned off because they don't trust the browser to be bug-free. This is a realistic fear: at least one version of Netscape's Navigator and at least one version of Microsoft's Internet Explorer have been released that permitted a Java program to erase files from the user's hard disk.
Java can be either interpreted or pre-interpreted. This has made it possible to produce Java program development environments for many platforms, and to produce Java execution environments for many platforms, but it does slow down the execution speed. This shortcoming is being reduced by speed increases in personal computers and by growing sophistication in the Java software, but it will always be an issue for some applications.
Netscape, in a marketing deal with Sun, calls their "macro" scripting language for their browser "Javascript." Although there is some superficial similarity between the Java programming language and the Javascript macro language, the two are truly distinct. Javascript was introduced in Version 2 of Netscape Navigator, and significantly "enhanced" in Version 3. Javascript macros should evoke less concern about security issues than Java programs. Browsers that are Javascript-capable can be (and are at times by some users) configured to ignore Javascript.
The changes between Javascript for different versions of Netscape (and the corresponding scripting for Internet Explorer) have resulted in further difficulties for page authors. It is possible to write scripts that will work on some but not all script-aware browsers. Thus, using any Javascript at all on your page will require that you expend considerable effort on testing multiple versions, of multiple browsers, on multiple platforms.
Some pages containing Java have been observed to crash Lynx. This obviously prevents those users from seeing your page and also prevents your pages from being included in any keyword searchable index that is created using Lynx as the "crawler."
Some pages containing Java or Javascript have been observed to crash Netscape, or to freeze the whole system, forcing your reader to restart his or her computer. This is user-hostile and does not create a favorable impression of your organization!
Netscape Version 2 implemented Javascript in a way that is not entirely compatible with later versions of Netscape, so if you use Javascript, be sure to check out the behavior of your page as seen on Netscape Version 2.
More information about Java is available on-line:
If the source code is part of the HTML, then the browser must be able to interpret that source code so as to execute the program.
If the program is referenced by a URL, that file must be brought down through the network from the server and executed.
Dick Piccard revised this file (http://oak.cats.ohiou.edu/~piccard/oacrao00/pages.htm) on October 30, 2000.
Please send comments or suggestions to piccard@ohio.edu.