5.  What goes on my page?


Return to Appendix IV  Return to Roadmap  On to Fragile



Section Summary



What can I do on my own?


What can I do with an artist's help?


What can I do with a programmer's help?

Full-blown forms: in general, the information provided by the user of a form is processed by a 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 can just be stored away for use by the publisher of the Web page.

The CGI program may provide database access for updates, for revisions, or for reports. These "Real Applications" may well be a trend for some time to come, permitting application programmers to concentrate on their application, and using the web browser as a universal user interface.


What about CGI and JAVA?

When you work with a programmer on a web-based project, there are two possibilities: the program may be executed on the server or on the browser.

Server-based Execution

The program may be executed on the server, with the web browser providing the user interface. This is routinely provided under the name "CGI scripting."

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.


Browser-based Execution

The program may be executed on the browsing computer. This is available with some recent browsers using Sun Computer's "JAVA."

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:

Limited Universality

Browsers run on all sorts of hardware and software, so providing access to the intended functionality will depend on the availability of a JAVA-capable browser for the particular hardware and operating system that the user already has on his or her desktop. Many people will continue to use pre-JAVA versions of browsers because they have too little RAM or because they only have free access to the old version. Visually impaired people are much more likely to use Lynx, which does not include JAVA.


Limited Security

JAVA is a real programming language. An evil JAVA program could be embedded in a page that you innocently browse to. Such an evil JAVA program could, for example, erase your entire hard disk right then, or it could modify the system startup files so that the hard disk got erased the next time you start the system. It could also send copies of all your data files to someone else on the network, one at a time, while you continue to browse. There is no obvious limit to the mischief that could be done with JAVA.

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.


Limited Performance

Translating program source code (ASCII text strings) into machine language instructions (binary code) can be done in advance ("compiled"), at execution time ("interpreted"), or partially in advance and completed at execution time ("pre-interpreted"). These three strategies differ in their efficiency as measured by execution speed of the program, in their portability among hardware and software environments for program development, and in their portability among hardware and software environments for program execution.

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.


When should I use JAVA?

You should avoid using Java or Javascript on your home page, and use it on other pages only when necessary to accomplish a required function. Web pages that depend on Java will not be displayed as intended by the author whenever they are viewed by a reader whose browser does not support Java, or whose browser is configured with Java disabled.

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 the computer. This is user-hostile and does not create a favorable impression of your organization!


How does JAVA Work?

The HTML file can contain either the source code for the JAVA program (enclosed in a <SCRIPT> block) or the file on the server containing the JAVA program can be referenced by a special tag (<APPLET CODE=AppletName.class>) identifying its URL.

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.


Return to Appendix IV  Return to Roadmap  On to Fragile


Dick Piccard revised this file (http://ouvaxa.cats.ohiou.edu/~piccard/oacrao97/pages.htm) on November 11, 1997.

Please send comments or suggestions to piccard@ohiou.edu.