![]() |
Web Conference 2004Writing Perl/CGI Scripts for ITS/ASET Web servicesThe Basic 'What?'s |
| <- Back - What This Covers | | | Up | | | Penn State Specifics - Next -> |
What is CGI?
CGI is an acronym for Common Gateway Interface, and is a standard for describing how Web browsers can communicate data back to Web servers over the HTTP protocol. CGI also defines how Web server programs (such as Apache) can run other programs on the Web server computer to generate dynamic content for each request. These secondary programs, or CGI programs, are commonly called CGI scripts because the language used to write them is usually either Perl or a UNIX scripting language. However, CGI programs can be written in any language the Web server computer can run.
The Free On-Line Dictionary Of Computing has this to say on Common Gateway Interface, and this to say on CGI scripts.
What are other forms of dynamic content besides CGI?
Here are some examples of server-side dynamic content; content that is generated on the server.
Server Side Includes (SSI) - a simple way of loading in parts of Web pages from other files, and displaying variables such as last modification date. This site makes heavy use of SSI.
PHP Hypertext Preprocessor (formerly Personal Home Page) - a programming language that is usually embedded inside special HTML tags of Web pages. When programming languages such as PHP are embedded in HTML, the Web server program has a component that interprets the code within the Web server process.
Active Server Pages (ASP) - Another form of dynamic content embedded in Web pages. ASP ususally uses the VBScript (Visual Basic Scripting Edition) as the embedded language. Like PHP, the programming code can live alongside HTML in the same file.
Mason - a way to embed Perl in Web pages similar to PHP and ASP.
Servlets - Most commonly used in Java environments (ie Java Server Pages or JSP). Similar to CGI, servlets run a separate process to handle generating content for the Web server. Unlike traditional CGI, Servlets tend to run continuously, rather than exit after each page request.
What are forms of client-side dynamic content?
Javascript
Flash
Java Applets (compare to Servlets)
What is Script?
A script is a program that does not need to be compiled or converted into another format before running. Such programs are called interpreted languages, because you have to run another program, the interpreter, to read your script and execute it.
What is Perl?
Perl is a programming language used for many purposes, most popularly CGI. Perl is short for Practical Extraction and Reporting Language, as well as (affectionately) Pathologically Eclectic Rubbish Lister.
Perl is a common example of a scripting language. You can write a program in Perl, such as test.cgi, and then use the Perl interpreter program, /usr/local/bin/perl, to read and execute your code.
A protocol is basically an agreement on how a discussion should proceed. It is similar to a language in that there are rules for discussion, but is more abstract and only cares about a limited number of points. For example, you can have a protocol on how you will run a meeting, but will still use English as your language. Computers are the same way, but speak in bits (numbers) rather than sounds or scratches on paper/whiteboard. The Free On-Line Dictionary Of Computing has a decent decription.
HTTP is an acronym for Hyper-Text Transfer Protocol, and is a protocol for describing how Web browsers and Web servers communicate over the Internet.
A process is a program that is currently running or executing on a computer. For example, you may have one program called helloworld.cgi, but can run it multiple times on the same computer. Each separate instance is called a process.
| <- Back - What This Covers | | | Up | | | Penn State Specifics - Next -> |
If you have any questions, feel free to ask me - mailto:jcd@psu.edu
Content by: Jeff D'Angelo <jcd@psu.edu> © 2004
Last update on: Sunday, 13-Jun-2004 11:18:35 EDT
[ This space intentionally left blank. ]