CGI: Common Gateway Interface
HOME
Java
ActiveX
JavaScript
VRML
Video
Audio
CSS
DHTML
XML
CGI

What it is:

  • A way to add interactivity to Web pages.
  • Not a scripting language (as many think) but a way for scripting languages to interact with a Web server.
  • Scripts can be written in Perl, C++, etc. even server-side JavaScript.
  • The scripts are server-side. They live on the server and are executed in server memory. (as opposed to JavaScripts run on the client side)
  • All Web pages with Forms require a script to do something with the data. Some use client-side (JavaScript) but most use some CGI script.

    Pros:

  • Lots of examples out there
  • Fairly easy to program

    Cons:

  • Server side... requires more resources, more round-trips
  • Not as dynamic and responsive as client side options

    Examples:

  • Example 1: simple text mailer
    Reader fills out a form, clicks on "submit" and the script parses the data and forwards it to a mailbox.
  • Example 2: guestbook
    Readers sign in
  • Example 3: discussion / graffiti board
    Discussion: basically, Web pages are built by reader input, and dynamically updated.

    Resources:

  • Perl User
  • CGI Resource Index
  • Matt's Script Archives