Web Development with Apache and Perl 221
Web Development with Apache and Perl | |
author | Theo Petersen |
pages | 400 |
publisher | Manning |
rating | 8 |
reviewer | davorg |
ISBN | 1-930110-06-5 |
summary | Good Overview of the State of the Art in Open Source Web Development |
I mention Stein's book because that's what this new book reminded me of most (that, by the way, is a huge compliment). Petersen realises that an overview of the whole web development area would be difficult to write (and, ultimately, unhelpful) so he restricts himself to a subset of the available technologies - Perl and Apache - and gives a thorough review of the state of the art of web development in these areas.
But before he gets into the details of Apache and Perl, in chapter 1 Petersen takes a look at the wider world of Open Source Software and in the process presents one of the best arguments I've seen in print for why a company should choose Open Source Software. In chapters 2 and 3 he takes the same approach with web servers and scripting languages, giving compelling reasons for choosing Apache and Perl.
Having chosen his architecture, in part 2, Petersen moves on to looking at some common tools for web development. Chapter 4 looks at databases. The two main Open Source Databases (MySQL and PostgreSQL) are compared and MySQL is chosen as the basis for the rest of the examples. Chapter 5 discusses the shortcomings of the standard CGI architecture and introduces mod_perl as an alternative. This is a good introduction to a technology that some people can find hard to get to grips with. Petersen takes us through the use of Apache::Registry before moving on to the complexity and power of mod_perl handlers.
Chapter 6 looks at the importance of security in web applications and discusses in some depth the problems of user authentication and the use of SSL for secure data transmission. Chapter 7 looks at ways to separate content from presentation. First we look briefly at server-side includes, but the majority of the chapter is taken up with a review of the various templating systems that are available for Perl. The chapter finishes with a detailed look at two of the most popular templating solutions - HTML::Mason and Template Toolkit.
Part 3 of the book looks at three different types of web site in great detail. In each case Petersen uses the examples to take a brief survey of a number of the existing tools. For example chapter 9 looks at a community web site and contains information about a number of web-based forums and chat rooms. It also takes an extended look at Slashcode the software that runs Slashdot. Chapter 9 takes a similar approach for intranet sites and Chapter 10 for online stores.
In part 4 we take a longer term view of a web site. Chapter 11 looks at content management systems and chapter 12 lookat at performance tuning. Both of these chapters are full of useful advice on how to make running a web server as painless as possible.
I think this is a very useful book to have on your bookshelf. Anyone who is developing web applications using Apache and Perl will find something useful in the book. It should be obvious that in order for a single book to cover so much ground, sometimes there isn't quite as much technical detail as you might like, but there is a good bibliography that will show you where to go for more information. In my opinion the high-level approach makes the book particularly useful for a couple of groups of potential readers. Firstly I think it makes a great introduction to the subject for someone coming to Apache and Perl for the first time. Secondly (and perhaps most importantly) I can see the book (in particular the first three chapters) being very useful reading material for a manager who is making a decision between using Open Source Software or some proprietary technology.
You can purchase Web Development with Apache and Perl from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
OSS and Dev in Perl and Apache (Score:1, Interesting)
Web Development and the Federal Government (Score:2, Interesting)
And yet, it's still being used in the Department of Foreign Affairs as need-to-know material for our intranet site developers.
However, most of the n00bs here seem to read PHP and MySQL web development [amazon.com], by Luke Welling and Laura Thomson.
The Canadian government uses Java, XML, VB/VBA, SQL Server, and ASP, but SQL and PHP are the primary ones.
I did ask around at web development and we did in fact order copies of the new book that you reviewed though. Cool, eh?
No Discussion of XSLT? (Score:5, Interesting)
It's a real missed opportunity if this book doesn't also talk about using XSLT as a way to separate content from presentation - especially as the Apache project has its own XSLT engine, Xalan, available in both C++ and Java.
A quick HOWTO on wiring that gear into an Apache configuration would be really useful.
Re:Not necessarily true (Score:2, Interesting)
From the site:
Re:not to be too flamey (Score:3, Interesting)
I really tried to like PHP. It has somewhat more "regular" syntax than perl, lacking most of the awful @$% decoration of variables and such. I launched into creating this monstrously nifty CMS system in PHP, very OO in the internals, very extendable...
Then I learned that PHP passes all objects by value. There is a pass by reference syntax, I just had no idea that this was the required default for objects. Fine, ok, it looks kinda like perl, but it's not perl, I can accept this. Then I learn that PHP has no facility to distinguish objects by identity. Now I need to generate a unique ID on every object. I went to Zeev himself to address this problem, and the man had to be taught the concept of object identity (what eq gets you in lisp and a pointer compare gets you in C, basically). He then proceeded to dismiss out of hand the entire concept, and went and suggested a === operator that actually did the polar opposite of what it is supposed to do, resulting in more expensive comparison (still by value mind you) than any other comparison operator. Zeev said "PHP is not an object oriented language" (direct quote).
I asked for a facility to disable certain functions at runtime -- I needed to run them first, then in the same process, disallow them from being run again (since it could take arbitrary user code that would be fine so long as it didn't touch the filesystem or open sockets). Actually I had it able to override built-in functions, but all I really cared about was being able to disable them. Offered sample code. Refused. The rationale was that the idea was too dangerous, that people could hang themselves with it. I pointed out my failure to grasp how deliberate disabling of functionality opened up any problem areas. Silence.
I asked at one point whether PHP had the intent of achieving a broader focus beyond the web. The response was "no, php is a web language". Perl not only tries to be many things to many people, it *is*. PHP itself has a nice bazaar culture of development, but the Zend virtual machine is absolutely a cathedral. I can't in good faith use a language that has been crippled, in ways that affect me directly, and has been deliberately left so in order to effect some sense of parsimony. This is "why PHP is not my favorite language" (one of those euphimistic forms going around, like "___ considered harmful")
Re:Isn't it time web development moved on? (Score:3, Interesting)
You know, I thought exactly the same thing - I've written a LOT of perl-driven sites over the years and always considered PHP a sort of "perl for dummies" until I actually decided to use it.
Maybe the earlier versions were bad (you can see by the fact the language still has a lot of ugly constructs that it's evolving all the time), but it really is excellent for putting a dynamic site together very quickly. The huge amount of convenience functions just save so much time (yeah, ok you could have a massive library of Perl objects and functions you coud pull in to every script, but it's not going to be as fast).
Then there's the fact a designer can work on the same files as a coder without having to use templates.
It's fast too! No, not C/C++ fast, but I certainly haven't noticed any database driven sites being held back by it - and freedom from
Of course, for command-line tools I still use Perl.