Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

Anatomy of the Web Bomb: Part 2



Common Gateway Interface (CGI) programming involves peculiar flows of control and data. Follow the solid black arrows to trace the flow of control from programs to documents to programs to documents as the Web BOMB works. Follow the red, numbered circles to trace the flow of the three items of data -- the article's issue (1) , section (2) , and title (3) -- that make the Web BOMB context-sensitive.

E. Widgets that the HTML forms language supports include radio buttons, check boxes, single-line text boxes, multiline text boxes, drop-down listboxes, and command buttons. Of these, the Web BOMB uses only three: radio buttons for the multiple-choice questions, a multiline text box (not visible here) for the free comments, and command buttons (not visible here) to send or reset the form.

Be sure, as always, to check the look of your form in a variety of browsers. This layout, with vertical bars separating the choices, looks fine in Netscape, but not so hot in Mosaic.

F. I found the NT version of Perl 4 that I'm using here on Process Software's ftp site, ftp.process.com. The CGI library, cgi-lib.pl, is there, too.

Intergraph originally ported Perl to NT, so you can also find NT Perl stuff at ftp.intergraph.com.

G. In the Web/CGI environment, it's easy to return the user to a form that hasn't been completely or correctly filled in. Just tell the user to go back -- something all browsers can do. No programming required here!

H. I could have fed the results into a live database back end, but that wouldn't have been as easy, as modular, or as portable.

This solution creates a file for each comment record. Off-line, I can scoop up the comments, turn them into a database import file, and run SQL queries on them.

I. Here's where the original article's URL, obtained from the HTTP_REFERER variable, finally gets put to use. Clicking on it returns the user directly to the original article.


Back to article: Bomb's AwaySearchSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network