UKUUG home

UKUUG

(the UK's Unix & Open Systems User Group)

Home

Events

About UKUUG

UKUUG Diary

Membership

Book Discounts

Other Discounts

Mailing lists

Sponsors

Newsletter

Consulting

 


 

Perl for Web Site Management John Callender
Published by O'Reilly
ISBN:1565926471
528 pages
£ 24.95
Published: 2nd November 2001
reviewed by Mike Smith
   in the May 2002 issue (pdf), (html)
bookcover  

From the title I was under the impression that this book would offer some Perl scripts for managing websites (!) You know - tidying apache logs, er, tidying apache logs and possibly tidying apache logs. Okay, perhaps there isn't much you really need to do in this area so its no surprise that rather more ground is covered - not on the server management side, as I was considering, but more on the construction of sites to facilitate easier management of the content, and to provide features on your sites.

Also, to be clear, the emphasis of this book is on learning Perl; not learning website management techniques alone (using your already proficient Perl skills). I really got the wrong end of the stick initially.

Overview This book is particularly good at defining what its scope is - and specifically the areas which are not covered (eg html, web design etc). I can see that it would have been easy to stray into related subjects, but the focus is kept.

The author provides some good advice on a wide variety of subjects. Things like Evaluating a Hosting Provider (so that you get the features you need) and scripting techniques. It's the sort of stuff you tend to take for granted once you know it, but he's done well to capture and communicate this type of information.

There's a whistle-stop tour of UNIX - all the important stuff: man, shell, permissions, vi vs emacs etc. Then we have the obligatory introduction to Perl. This moves very quickly, which is refreshing. As anyone who's written a cgi script knows, missing out a Content-type: header can cause all sorts of head scratching, permissions checking, path checking etc. That sort of thing is covered too. I passed through my Perl phase several years ago and now only tend to use it when necessary. (These days I mainly use PHP for web scripting and database connectivity.) So the reminders were useful for me.

Getting down to business There are a lot of code fragments, which is great. Not too over the top (full scripts are saved for later), but enough to get the point across. The early chapters provide quite a range of good techniques. Beware though that there are quite a number of errors - I noticed a couple, but checkout the O'Reilly website for the full list. Despite this, we're producing useful little routines very early on. Great stuff.

Then we start hitting the major web management topics, like making a template system - how many of these have you seen already ?! If you don't use webalizer or something similar, Chapters 8 to 10 cover the parsing and analysis of access logs. This is also useful if you want to do something specific with the logs which is not covered by your standard analyser, of course.

An important part of Perl today is using modules, where much of the hard work and debugging has already been done. Downloading, installing and using such modules from CPAN is covered, and this is a good introduction to more sophisticated programming techniques. Of course there are many other O'Reilly titles which would expand on this once you've mastered the basics here.

There is also an example of how a simple document management system can be implemented, a bit like a primitive slashcode or postnuke system. We also have: Implementing a Search facility; Testing weblinks, ... well you might as well look at the contents on the web. Anyway, they're all interesting and potentially useful, and they are not there just for their own sake - they are there to introduce new Perl concepts all the way along.

Near the end of the text, DBM files are covered. This is a useful halfway house when you're using hosting services that don't have mysql facilities, for instance. However I find such techniques (for instance, using the tie command) a bit clunky. You might be tempted to look at MLDBM module, although why not go the whole hog and start using DBI - there's another whole book on that though !

The very last chapter looks at the next stages - whether to go deeper into Perl, or perhaps look at other programming languages. There is also the inevitable recommendation to look at relational databases; although the reservations regarding MySQL are a little out of date I think (ie lack of transactions).

Summary It's a good book, and a good read. No doubt about it. Whether its worth having in your kitbag is a tricky question. It probably is right for non-programmers who are pushing the boundaries of their web development (which is of course precisely the target audience). Using Perl for cgi scripts complements the use of PHP for embedded code (or indeed Embperl), and of course with Perl you can do many other things too. I think it's a good introduction, and if you haven't got the camel book this is certainly another option for you if you work (or play) in this type of environment. ... Then you can go and get the camel book anyway !

I couldn't find anything on tidying apache logs. Ah well.

Back to reviews list

Tel: 01763 273 475
Fax: 01763 273 255
Web: Webmaster
Queries: Ask Here
Join UKUUG Today!

UKUUG Secretariat
PO BOX 37
Buntingford
Herts
SG9 9UQ
More information

Page last modified 03 Apr 2007
Copyright © 1995-2011 UKUUG Ltd.