"Do you know UNIX?
He then states: "If you answer yes to these three questions, the book shouldn't be hard for you". I would have to agree that this is good book for intermediate level developers and above, but feel that it is quite useful even if you don't know UNIX.
Since my interest in primarily in the Windows side of Perl, the Tcl examples in the book were not examined in depth. By showing a solution to each programming problem, using two different languages, the author does demonstrate that "CGI coding isn't about languages, it's about solving problems".
One of the most interesting pieces of information presented in the preface is the organization of the book. The author not only summarized his current chapters, but showed what he was originally going to write.
The book starts with background material, without resorting to several chapters about the complete history of the Internet, Perl or HTML. The background information that is presented describes the client-server technology that was quite prevalent in 1997, when this book was copyrighted.
I found that, in spite of its age, this book is quite useful for almost any Perl developer. The material provided about how CGI works is quite good and the process is summarized quite well. The author spends twenty pages on cookies -- a topic that complete books are written about. He also provides all the necessary information to integrate cookies into your CGI software.
The text and fonts used in the book were quite readable, except when the book designer decided to create certain pages that looked like a large notepad. This concept was novel, but then the designer decided to also tint these pages and add more and more tint going down the page. The bottom paragraph ends up being extremely difficult to read, since its black letters are printed against a very dark, gray background. Also for some reason, the book designer also decided to darken the left margin of each program listing. Fortunately, this only affects the first few characters in each line, but this also makes reading more difficult.
For those not familiar with TCL or Perl, J. M. Ivler, the author, does describe key features of these two languages. Even so, I don't feel that this is a book to learn Perl or Tcl from. It should be used to learn more about CGI programming. The text, while slightly dated (some Y2K issues are discussed), does explain HOW each program works in detail, both in Tcl and Perl. The author gives you a great overview of the entire CGI process with specifics on how to implement and use this interface.
One example in the book gives specific data file manipulation routines, but the application provided can only add or delete records with no provision for updating a record. While somewhat useful, I don't consider this an example of an "industrial" strength program, as the book describes this code. While most people will probably use real databases, I still feel that simple databases work very well for small amounts of data, like the calendar application shown in the book. I simply feel that a more feature-rich application should have been provided instead.
While this book may be too basic for advanced developers, it did discuss both Tcl and Perl. Tcl seemed quite interesting and it is a topic that I would like to delve into in the future. (No, I'm not giving up on Perl, but since the graphical portion of Tcl can be accessed from Perl, this would make a very promising cross-platform graphical user interface.)
I didn't find any major errors in the text, except for the discussion of Class B and C Internet addresses -- RFC 1597, but these aren't relevant to Perl developers, only network administrators. Unfortunately, I did notice that several of the Perl programs needed modification to function in a Windows environment.
There were also errors in the included software. I have NO idea how the first program presented ("getcode1.pl") could ever have worked, since 3 incorrect variables are used in the program. The variable $cookies is used instead of the variable $cookie and the variables $lval and $rval are used instead of correct variables $lv and $rv. Since the CD and the book listing are both identical, this doesn't appear to be a misprint in the book. The book's website states that "all the CGI programs on the CD have been tested", but this program could never have worked as intended, as it appears in the book. While each program might be syntactically correct, I found several others that did not work properly. The book's web site is referred to, inside the book, for further information and also says to look for updates on the site, but there doesn't appear to have been ANY updates in over FIVE years!!!
Because you will have little support with the included programs, you will be on your own. I feel that developers need to get used to this lack of support, since portions of shareware or freeware CGI source code you find on the Web, may not work on the first try either. After all, learning to debug "nearly correct" Perl code is a skill that MUST be experienced and constantly practiced. Therefore, these errors aren't a bad learning adventure, if you have the time and if you are an intermediate to advanced Perl programmer. Fixing small mistakes will keep your debugging skills honed for real use, when similar errors are in the code that you have written.
In spite of the software errors, which occur in nearly every programming book, I feel that this is a good book for beginning to intermediate CGI developers that are at least intermediate Perl developers. Fixing these programs may be a bit too arduous for a beginning Perl developer, but the experience could be quite worthwhile, if you have enough time to devote to the process.
© 2001 Rick Smith All rights reserved.