|
An image map; clicking on different parts of this image determines what happens next. You used to have to know CGI programming to create one of these. |
|
|
Most CGI Programs Are Written in Perl |
|
Because the Internet originated within the UNIX world (before Windows computers or Macintoshes were hooked up to it), much of what drives the Internet (and the Web) is based in UNIX. CGI stems from this same basis, and the Perl language is a UNIX-based language. But, a CGI program can be written in any language that the Web server supports. |
|
What's a Scripting Language? |
|
It's impossible for a computer program to be all things to all people. Software publishers try their best to make sure their programs can handle most of what users want, but they can never anticipate everything. To make their programs more flexible, many provide the ability to extend or change how their program behaves through a script. Scripts are nothing more than a sequence of program instructions (called statements). The program steps through the statements one at a time and performs whatever the script tells it. This is exactly the same as "programming," except that scripts tend to have simpler rules and require less learning time. Some examples of programs that provide scripting are dBASE, Paradox, and Microsoft Access (although there are many more). Some examples of stand-alone scripting languages are Perl and REXX. Script languages make extending these packages easy. You don't have to be a programmer, purchase an expensive compiler, learn some strange, pseudo-English language, and start wearing plaid shirts with pocket protectors. |
|
What's an Object? |
|
Like the word implies, an object is a thing-any thing. The term object is used to generically group a collection of different things together. In the world of computers, objects are different pieces (or building blocks) that make up a computer system or program. Using objects shields a programmer (or a JavaScript writer) from having to understand how the operating system works. You can think of objects as little black boxes. You poke things into it (called setting properties) and in response, the black box does something. Actually how it works isn't important, just that it works. This is the basis for the concept of object-oriented programming, where the programmer is more concerned with what an object is doing than how it gets the job done. For example, if you had a "screen object," you could change the color of the computer screen by telling the screen object to set its color property to, say, green. Whether the computer is a Macintosh or an IBM PC, the object would do the same thing (although in different ways). In Chapter 6, you begin an up-close and personal look at objects in their natural habitat. |
|
|