ASPit - Totally ASP
Search PHPit

Use this textbox to search all the content on PHPit. Seperate keywords with a space.

Advertisements
Partners
  • Armbanduhren
  • Wired Subscription - International Magaz
  • Home Fitness Equipment
  • Accountants
  • Double Dragon

CGI Programming with Perl

Medium Thumbnail

Book Details

Availability: Usually ships in 24 hours
List Price: $34.95
Our Price: $23.07
You Save: $11.88 (34%)

Buy through Amazon.com

Spotlight Customer Reviews

Average Customer Rating: 3.36

Customer Rating: 5
Summary: Complete and well written
Comment: I thought this was a very complete, well written description of CGI programming. It's informative reading and also makes a great reference.

There've been lots of CGI programming by example books out there that try to show you a few examples and go from there. As this book claims, its approach is to teach you to understand how things work and use examples to support this instead of the other way around. It's complete, and the topics it covers even extend beyond CGI programming to other forms of web programming (especially mod_perl but even Java too).

This book doesn't try to teach you Perl, but I've not seen a good book that succeeds in teaching both together. Perl isn't just for CGI programming and there's a lot to it. If you need an intro to Perl, buy "Learning Perl" by Randal Schwartz (also by O'Reilly)... it's not too long and very well written, and after reading that then you'll be ready to learn to apply Perl to CGI.

I looked at the errata and there were some errors in the initial printing, but they're fixed in my copy so I can hold that against them.

Customer Rating: 4
Summary: What's different about this book?
Comment: While there're a few boooks available on CGI/Perl, what's different in this book you'd ask. If we compare it with "CGI Programming 101" by Jaqueline, it's more advanced and excersices better programming style. Uses 'strict' pragma and -wT switches ALL THE TIME, which I liked a lot. The programs are also compatible in mod_perl enviroment, which prove the fluency of the authors in Perl and Web Programming. Unfortunately their those capabilities don't make them good writers. They don't spend enough time on some of the concepts they introduce. They sepend more time and space then requried on JavaScript(chapter 7), which is about 23 pages, and spend only 16 pages on Data Persistence (chapter 10). But in Data Persistence chapter they tried to cover Text files, all kinds of file lockings, temporary files, DB_File, MLDBM, SQL, DBI. Now you have a rough picture of how dEtAiLeD their topisc are. Here I'll try go over chapters with comments and will be suggesting alternatives for the topic wherever it's applicable

Chapter 1, 2 and 3 give some history of the WWW and CGI. Also provide a smaple CGI application for getting started. I think chapter 2, "Hypertext Transfer Protocol" was pretty informative, and I ejoyed it a lot.

Chapter 4, "Forms and CGI" go over some form anatomy and elementary ways of encoding and decoding form input, which you might find usefull.

Chapter 5 is entirely dedicated to CGI.pm and it's application. I still think CGI.pm's documentation available online (or with your Perl distribution) does way better job than this one chapter.

Chapter 6, "HTML Templates" gives some nice examples of HTML::Template and Embperl usage. They spend good space on these, but only about 3 pages to cover Mason. Of course, the chapter can't take you too far without the original documentations of those mentioned libraries which are available online.

Chapter 7, as I mentioned was dedicated to JavaScript and JS validation. I think they were not supposed to spend so much time on JavaScript. For this one, go get JavaScript Bible, 4th edition by Danny Goodman.

Chapter 8, Security covers the security guidelines already available online as W3C's security FAQ by L. Stein and John Stewart.

Chapter 9, "Sending Email" was probably my favorite. It covers 'sendmai', mailx and mail and procmail. Spends good 18 pages on the topic and shows an examile that uses Mail::Mailer

Chapter 11, Maintaining State, was really poor. There's nothing much to learn in that chapter. For more profesional session management examples, I suggest you "MySQL and Perl for the Web" by Paul DeBois and Apache::Session manual available online.

Chapter 12, "Searching the web" give some advanced examples of web searching. The example of Inverted Index Search using DB_File was my favorite.

Chapter 13, "Creating Graphics on the fly" give some examples of dynamic graphic generation using GD, Image::Magick and GD::Graph. I could give this chapter hmmm... 3 stars :)

Chapter 14, "Middleware and XML" was the one I just skipped over.

The last 3 chapters of the book are dedicated to debugging, coding with style and eficiency with mod_perl and FastCGI.
For debugging and style, I recommend "Programming perl 3rd edition".

Overall, i benefitted from the book a lot as it implies from my review. But still wanna save my 5 stars for the 3rd edition :)

Customer Rating: 4
Summary: After the errata, then what . . .
Comment: I've got the July 2000 printing and was amazed at the errata and the errata items yet to be "confirmed"! As an example of the latter, just beyond half-way through the book there's an address book cgi script some 10 pages in length of which only the first page or so is explained. The script is an attempt to use the Perl DBI along with the DBD::CSV modules (utilizing SQL statements) to explain the database role in "Data Persistance"! The problem is that the "getQueryResults" subroutine in the script doesn't return any records when searching for particular field values (and returns every record in the database if no values are entered in the "search" form). In addition the "doUpdate" module reports that an update has been completed when in reality there has been no change to the database! If you're planning on using the book to learn some CGI with Perl, then you're going to be set back by this and other code malfunctions scattered throughout the book!

Even though it's a step up from the CGI Primer Plus for Windows book (and gets a 4 star rating), it still leaves much to be desired for the person who learns by coding!