|There's more than one way to do things|
Web Development with Apache and Perlby marvell (Pilgrim)
|on Jun 05, 2002 at 15:22 UTC||Need Help??|
Order Web Development with Apache and Perl
Item Description: How to build powerful web sites with Open Source tools
Review Synopsis: Apache and Perl is a whirlwind tour of Open Source web development.
My expectations before reading this book were that it would contain the basics of mod_perl, Apache config and some nice Open Source tools and Perl modules, like Mason. Since this book is not five thousands pages long, I didn't really think it was going to be able to be definitive in all respects, but that's OK, since about 95% of the tasks in this world can be done with 20% of the knowledge. I can't remember the last time I needed to customise the Apache configuration process, for instance, but I probably wrote a virtualhost directive last week.
From the preface (yes, I read prefaces), it was clear that the book was going to be a little more than that. Not only was it going to introduce the Open Source movement, but it was going to instruct me how to spec my web site, configure and develop it. Not only that, but it's going to talk about different types of web site in detail. On top of that it's going to talk about performance and marketing. 'This is going to be a roller coaster ride' I thought ...
... and that's what it was.
Part 1 of the book serves as an extended introduction, covering Open Source, web servers and the basics of CGI.
The Introduction to Open Source was reasonable but I'm not sure who it was aimed at. It didn't contain enough concrete business cases for a business angle and was slightly too honest about the configuration problems and potential support issues to appeal to developers or administrators. It did, however, cover the basics and was written with extreme enthusiasm. Theo is obviously part of the community and loves it dearly.
'The case for ...' is a common theme throughout. For a book trying to convince the reader to chose Open Source, I felt the lack of argument against alternatives was missing and the reader is expected to go with Theo's choices without sufficient justification in many cases.
Theo clearly has a lot of experience and knows what he's talking about, but I felt I was only able to keep up given my knowledge and experience of these systems. Given that he's going to command level, it's unlikely that a Unix or Apache newbie is going to keep up. Whilst reading though the Apache installation and configuration sections, for instance, I reminisced about the way I felt when I first started in the Unix world, at University. I felt lost and asked questions of the more experienced users to which I got a reply like 'do this, then that, this goes here and then if this doesn't work, read this log, get it?'. 'No' was that answer and even though I could remember the commands, I didn't understand why. I was guilty of the same, even recently, when mentoring a user whilst under pressure to finish a piece of work. I was faced with the familiar glazed expression I sported in my early days.
Part 2 discusses Open Source tools, databases, mod_perl, templating and security.
The database chapter, which is good in itself and brings up our first tools, other than our server level staples. These were WDBI and HTMLView. There was a good explanation of both, but I felt The justification for devoting the rest of the chapter to WDBI was a little lacking and I felt I would have liked to have known more about HTMLView, even if I lost some of the WDBI info.
This deep explanation of one of the alternatives is an unfortunate problem with the book as a whole. It's clear that Theo wants to give the user as much information as possible about the tools being used, going into installation and configuration issues. This does, however, mean that the reader doesn't get the opportunity to understand the alternatives and make informed decisions.
The explanation of why server level scripting is used was great, as was the migration path for CGI. Session and state were also covered in detail with good code examples. I didn't like the section discussing the problems associated with global variables in Apache::Registry based scripts. The problem was not sufficiently explained in order to give the user the ability to 'fix or rewrite it to get rid of the problem'.
The chapter discussing Security and Users is very good and contains a solid explanation of the protocols and issues involved. Again, some good code examples, but I felt the complete lack of authentication handlers in Apache was disappointing.
The greatest whirlwind was the discussion on Combining Perl and HTML. After a nice gentle start with SSI, we got into templates and Mason. As someone who has not used either in anger, I got totally lost. Before I knew it, we were into session management and my eyes glazed. As someone more familiar with XML, felt the final section lacked.
Part 3 of the book talks about the example sites. This is really where the book comes into its own. Not only is there a good explanation of the issues involved in Community, Intranet and e-Commerce sites, but there are a whole host of OSS applications discussed. No stone was left unturned for the functionality you might require. Importantly, the Apache and MySQL configuration requirements for combining the different tools was put in place. This is not the sort of thing that one can find in the INSTALL file for any of the individual applications. The code examples are superb and show just how Perl can be used as glue for existing tools.
Not knowing the complete list of tools available, I couldn't say if the list was complete, but I did notice a conspicuous lack of ht://Dig and Google, when discussing site searches.
Part 4 goes on to to tell us how to manage our Opensource site, introducing new tools and the concepts of staging sites and web farms. A good set of config tips and a good list of tools. One could have written a book on this topic, but Theo managed to get in just the right balance.
In summary, Theo is obviously trying to cram a lot into this book and its shows. He has gone into great detail about installation and configuration, but in each case, at the expense of giving more information about the alternatives. The subject matter is attempting to be so full, including tool specific arguments, installation and usage, that the information is rushed and often incomplete.
I felt confused about who the target reader was and I can only guess that Theo wanted to appeal to everyone, a very difficult task indeed. It was assumed that the reader knew enough about Perl to follow the examples, but nothing of Unix, CGI or databases; a confusing mix.
I got most from the third part, where the example sites were discussed. I learnt about new tools but wish I'd gained more from the Mason chapter in order that I could have understood the code examples fully.
The book is not a reference book, nor is it a wordy introduction to the concepts and issues associated with web development. It should be read by anyone wanting to write a decent sized to large web site who doesn't fancy reinventing the wheel. It should be read all the way through, and should be read in conjuction with other sources in order to understand a lot of the work.
I applaud Theo Petersen for his efforts, but wish he'd taken on less. The book could have been so much more, had it been more focused, or a about ten times as long.
Steve Marvell is the Proprietor of an IT Solutions Provider based in the South West of England and runs the Devon and Cornwall Perl Mongers.
This review may be used, in full, including this message, by anyone, but may not be edited without the author's permission.