Search this book | Previous | Table of contents | Next

But don't use .script files


Only use the .script file technique for your simplest scripting needs.

The important points of the previous sections were were:

  1. Scripts should return valid HTTP headers and HTML
  2. There are a number of values passed to scripts by the WWW server
  3. There a number of ways to get input for your scripts
These points are true for all scripting purposes where MacHTTP and WebSTAR are concerned.

After all that, it is not really recommended you use the .script technique for writing scripts, except for the simplest of scripts. The biggest reason for this is the server must load your entire script into RAM and prepend the client variables before anything happens. This is unnecessary overhead that can be avoided if you write your scripts as common gateway interface (CGI) scripts, described in the next sections. Also, this technique limits you to writing AppleScript scripts which may not be your forte or the best language for your particular application.

On the other hand, this technique demonstrates fundamental principles of scripting: the need for valid HTTP headers and HTML, as well as the existence of variables other than your input.


Search this book | Previous | Table of contents | Next

This page was first published on September 26, 1995. Feel free to send comments.