[Go Home] [Free Advice] [Free Software] [Back to those Frequently Asked Questions]
CGI -Common Gateway Interface - is the first means by which Web Servers could be extended to do NEW or DYNAMIC behaviors above and beyond HTML file serving. New behaviors can be added to an EXISTING Web Server (or HyperText Transport Protocol Server - HTTP Server) without changing the software already written and running! The Web Server delegates the new behavior to a CGI Script.
All CGI Scripts interact with a Web Server the SAME WAY:
The manner (or Protocol) in which the Web Server passes information to the CGI Script and the manner (or Protocol) in which the CGI Script returns the results to the Web Server are FIXED and totally described in a Common Gateway Interface Standard. Anyone who builds a commercial, shareware or freeware HTTP/Web Server supporting CGI follows this Common Gateway Interface Standard.
If your Web Server supports CGI, you can write CGI scripts to do just about anything a Web Browser can handle. CGI Scripts can:
Here are two examples - take a look at these CGI Script actions:
Your CGI Scripts run in the same operating environment as your Web Server. This is VERY IMPORTANT to remember!
1. You can write a CGI Script in ANY programming language that can be compiled for or interpreted by your Web Server's operating system.
All you need to do is follow the CGI protocol for communicating inputs and outputs from/to the Web Server! Your program must work with the ancient, yet venerated, C/UNIX concepts of the Standard-In and Standard-Out files for console-based applications. CGI Scripts can be written in:
2. Porting a favorite compiled CGI Script from one operating system to another is NOT necessarily easy.
CGI Scripts compiled for one operating system must be recompiled to be used on another operating system. But wait - this is really nothing new - this is the same as Windows and Macintosh versions of the same applications which we all work with today!
3. Porting a favorite interpreted CGI Script from one operating system to another is easy!
CGI Scripts written in Java and PERL can be easily moved from UNIX to Windows to Apple Macintosh to OS/2 - as long as the interpreting engine for those operating systems is already there! Interpreted applications run in a "simulated" computer or "virtual machine" - an interpreter. The simulated machine runs the program. The code underneath the simulated machine gets ported from one operating system to another. It's nice to let someone else handle this effort for us!
Last Revised: April 25, 2000
Copyright © 1996 - 2000 HomeWorlds (TM) All Rights Reserved.
HomeWorlds WebMaster