×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

CGI Programming on the World Wide Web
     

CGI Programming on the World Wide Web

by Shishir Gundavaram, Andy Oram (Editor)
 

The World Wide Web is more than a place to put up clever documents and pretty pictures. With a little study and practice, you can offer interactive queries and serve instant information from databases, worked up into colorful graphics. That is what the Common Gateway Interface (CGI) offers.This book offers a comprehensive explanation of CGI and related techniques

Overview

The World Wide Web is more than a place to put up clever documents and pretty pictures. With a little study and practice, you can offer interactive queries and serve instant information from databases, worked up into colorful graphics. That is what the Common Gateway Interface (CGI) offers.This book offers a comprehensive explanation of CGI and related techniques for people who hold on to the dream of providing their own information servers on the Web.Good scripting is not limited to a knowledge of CGI — you need to know something about other programming tools that organize data and make the output look attractive. Gundavaram starts at the beginning, explaining the value of CGI and how it works, and takes you swiftly into the subtle details of programming. The book offers a comprehensive look at the job of providing information dynamically on the Web.For most of the examples, this book uses the most common platform (UNIX) and the most popular language (Perl) used for CGI programming today. However, it also introduces the essentials of making CGI work with other platforms and languages. The actual programming techniques are not too different from one platform and language to another; the lessons from this book can be applied to any tools you choose.Topics include:

  • Basic Perl techniques for parsing and output
  • Embedding Server Side Includes (SSI)
  • Graphics and simple animation
  • Forms and magic cookies
  • Gateways and SQL processing
  • Internet communications
  • Examples of games, imagemap manipulation, and other advanced applications

Editorial Reviews

Ray Duncan

Creating Interactive Web Applications

The Common Gateway Interface (CGI) is an World-Wide-Web protocol for passing structured information between a Web client and another program, using the Internet as the transport and a Web server as an intermediary. Typically, data or query parameters are collected from a user by means of a "form" that is encoded in hypertext markup language (HTML) and rendered by the Web browser. Results are returned to the user by dynamic generation of HTML text and tags which are sent back to the Web browser for display.

The mechanisms of CGI are merely the standard input device, the standard output device, and environment variables. In this simplicity lies great power: CGI allows a Web browser to serve as the "front end" for virtually any type of application or database, residing anywhere on the network. The simplicity of CGI also, paradoxically, makes it the special domain of software virtuosos. The CGI developer must be fluent in HTML coding, Web server configuration, scripting, access rights, the commands and features of any database that is involved, and a host of other issues. As Shishir Gundavaram comments in the first chapter of CGI Programming on the World Wide Web:

One of the Internet's worst-kept secrets is that CGI is astoundingly simple. That is, it's trivial in design, and anyone with an iota of programming experience can write rudimentary scripts that work. It's only when your needs are more demanding that you have to master the more complex workings of the Web. In a way, CGI is easy the same way cooking is easy: anyone can toast a muffin or poach an egg. It's only when you want a Hollandaise sauce that things start to get complicated.

CGI Programming on the World Wide Web is evidently intended to be a companion volume to Musciano and Kennedy's HTML: The Definitive Guide (O'Reilly, 1996). The two books have similar designs and very little overlap in content. However, they will appeal to very different audiences. HTML: The Definitive Guide is a straightforward reference that any tyro can dip into for information as it is needed. CGI Programming, on the other hand, is a demanding tutorial and cookbook that must be assimilated in a sequential, methodical fashion.

Gundavaram spends the first few chapters on the underpinnings of CGI and shows how CGI can be used with a variety of languages, including Perl, C, C++, Tcl, the C shell (csh), and Visual Basic. He then presents a sequence of increasingly sophisticated CGI applications ranging from clocks and counters to games, tests, polls, and databases. Especially valuable are Gundavaram's demonstrations of the use of Ghostscript, gnuplot, and pgperl for the dynamic generation of Web charts and other graphics, and his discussions of "maintaining state" across a series of inherently stateless HTTP transactions.

CGI Programming is heavy going for the most part, and takes a great deal of UNIX-centric background information for granted -- ranging from regular expression parsing to the organization of "man" pages to spawning and forking of processes. Gundavaram's first love is clearly Perl, and the majority of the example applications are provided only in that language. A separate Perl tutorial and reference (such as O'Reilly's Programming Perl) will be indispensable while working your way through Gundavaram's book. Some code relies on the object-oriented features of Perl 5 and may appear unfamiliar even to Perl veterans.

A multitude of CGI books have appeared on the market over the last few months, even though CGI itself is becoming somewhat passe in the face of integrated Web server/database products, Java, and other new technologies. Gundavaram's CGI Programming on the World Wide Web stands above most other CGI books for two reasons: the depth and breadth of the author's experience in CGI programming, which is self-evident in the example applications, and the publisher's characteristically painstaking editing and production, which offsets the difficulty of the material and the author's occasionally fractured English.--Dr. Dobb's Electronic Review of Computer Books

Product Details

ISBN-13:
9781565921689
Publisher:
O'Reilly Media, Incorporated
Publication date:
03/08/1996
Series:
Nutshell Handbooks Series
Edition description:
Older Edition
Pages:
450
Product dimensions:
6.98(w) x 9.14(h) x 0.97(d)

Meet the Author

Shishir Gundavaram graduated from Boston University with a BS in Biomedical Engineering in May of 1995. For his undergraduate thesis, he developed a Windows application for the Motor Unit Lab of the NeuroMuscular Research Center that allowed researchers to acquire and analyze muscle force output from patients to indirectly observe the electrical activity of muscles. He was the sole author of CGI Programming on the World Wide Web, published by O'Reilly & Associates, Inc., in 1996.

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews