Features
- Cover Type: Paperback with 724 pages
- Published by: O'Reilly Media, Inc.
- Edition: 1st Edition March 1999
- Written in: English
- ISBN 10 Number: 156592567X
- ISBN 13 Number: 978-1565925670
-
Book Dimensions:
9.2 x 7 x 1.2 inches
- Weighs: 2.3 pounds
Product Review
Writing Apache Modules with Perl and C will allow you to enhance your Apache HTTP server in just about any way you'd like. Overall, it is an great book, and it has a lot of good information and terrific examples on everything from "Content Handlers" to customizing the Apache server configuration process.
It's quickly apparent that Lincoln Stein and Doug MacEachern spent valuable time writing this book considering the breadth of their subject and the depth they devote to it. The only downside to the book is that it's kind of hard to explain all of the API functionality without assuming a minimum level of competence from the audience. For that reason, this book might be a bit intimidating to novice programmers, but it really rewards you if you put time into it and tinker with things.
The book also works well as a source of ideas and inspiration for when you have to write your own server modules, and I'd recommend it if you want to customize your Apache server or speed up your Perl CGI programs.
--Doug Beaver
Book Description
Apache is the most popular web server on the Internet because it is free, reliable, and extensible. The availability of the source code and the modular design of Apache makes it possible to extend web server functionality through the Apache API. For the most part, however, the Apache API has only been available to C programmers, and requires rebuilding the Apache server from source. mod_perl, the popular Apache section used primarily for enhanced CGI performance, changed all that by making the Apache API available to Perl programmers. With mod_perl, it becomes simple to develop Apache modules with Perl and install them without having to rebuild the web server.
Writing Apache Modules with Perl and C shows how to extend web server capabilities regardless of whether the programming language is Perl or C. The book explains the design of Apache, mod_perl, and the Apache API. It then demonstrates how to use them to perform for tasks like the following:
- Rewriting CGI scripts as Apache modules to vastly improve performance
- Server-side filtering of HTML documents, to embed special markup or code (much like SSI)
- Enhancing server log functionality
- Converting file formats on the fly
- Implementing dynamic navigation bars
- Incorporating database access into CGI scripts
- Customizing access control and authorization to block robots or to use an external database for passwords
The authors are Lincoln Stein and Doug MacEachern. Lincoln is the successful author of
How to Set Up and Maintain a World Wide web Site and the developer of the widely used Perl CGI.pm module. Doug is a consultant and the creator of the innovative mod_perl Apache module.
Reader Reviews
I once read that you could not consider yourself a Unix Wizard until you had hand written a SendMail configure script once, and that no sane person ever did it twice. The first part of that truism can perhaps be said of Web Wizards and Apache modules. Fortunately Apache modules are a little easier to write than Sendmail configurations and this book makes it easier still. Let's not mince words. Perl scripts and other CGI software can quickly become performance bottlenecks on any server, no matter the size of your hardware. The most powerful way of fixing this is to fold a fair amount of that programming inside the server where the overhead of loading interpreters, libraries and code is already taken care of, not to mention you find yourself with much more power and control over the dialogue between server and browser. Unfortunately writing to an API as large and complex as that in Apache is not always easy. MacEachern and Stein go to a great deal of trouble and exert a fair degree of skill in breaking the learning down into manageable chunks and explaining it all with a large number of examples. This was the first book I read that really made me understand the process going on, both between the two pieces of software and inside Apache, when a page is requested. From there the book goes on to give you a marvellous understanding of how to write a module in Perl that fits into that process. Finally the last three chapters are excellent API reference guides, one on the Perl API and two on the C API, and an excellent index (which indexes every function in the API's as well as key concepts) make this a superb tool when you get down to writing. The book does not cover using C in any where near as much depth, but the vital conceptual understanding required and explained in the Perl chapters means that once you have written a module in Perl I don't believe you will find it a problem to do it in C. I have to say though, as a C programmer I am yet to do it, I get so much performance out of a module in Perl I've yet to find the need. I read this book before starting my first module and I have now written three. I would never have even contemplated the task before reading this volume. I would recommend this book to anyone who wants to get a full understanding of writing software for the web and anyone who wants a quantum leap in the performance of their web software. You will need some fair Perl skills and preferably written a few CGI scripts as this book does not cover the language skills required at all.
Comment | |
(Report this)