Book Review: Catalyst, Accelerating Perl Web Application Development

April 11, 2008

Recently I was contacted by a publisher from Packt publishing about reviewing a couple of books, after a long time (sorry I took so long!) I’m finally finished with my review of the first book, Catalyst: Accelerating Perl Web Application Development. Note that while I was asked, I wasn’t paid for this review, this is my personal opinion.

Firstly, for anyone unfamiliar with Catalyst, Catalyst is a MVC (Model-View-Controller) framework using Perl, for anyone familiar with Ruby on Rails, Catalyst is extremely similar.

The book is written by Jonathan Rockway, who is one of the core team members of the Catalyst team, which gives the book a solid technical background. The book’s text is easy to read and understandable.

Catalyst starts by giving a brief introduction to the MVC methodology and instructions for downloading and installing the Catalyst run-time. One thing to note is that this book is not for readers new to Perl, the book assumes you have a solid knowledge of Perl intricacies and experience using CPAN, which is required to install the multitudes of modules required for Catalyst development. I found that a certain level of problem-solving was required, as not all CPAN modules installed cleanly. I had to force-install a few of the modules and manually resolve a number of dependencies in order to get all the required modules. This barrier to entry might discourage some beginners just starting out with Perl and Catalyst. Other than that, all the installation instructions were very clear.

Developers don’t learn very well with just theory, so Catalyst does a good job of providing a sample application to develop and extend throughout the book. The bulk of the development centers around creating an Address Book application, which is then extended to have features like authentication and AJAX later on during the book. Personally, I’m happy the same application is used, rather than switching applications every chapter. The book does change applications for a couple of chapters (which I find is good, to give a different app’s perspective), then returns to the first application afterwards.

The book discusses a lot of the cool features of Catalyst, such as FormBuilder, templates, REST APIs, Jemplates, AJAX and RSS feeds. The book describes ways to use these features to help speed up development and move away from repetitive code creation. In chapters 8 and 9, testing and deployment are discussed. Personally, I would have liked to see the testing and deployment chapters moved up and integrated into the earlier chapters to enforce a methodology that includes testings from the beginning of development, but I can understand moving it to the end to make entry into the framework a little easier.

One other thing to note, as with almost any programming book, syntax and spelling errors can be killer when attempting to replicate code written in a book, the Catalyst book has a list of errors pertaining to the code in the book, which caused me a great deal of frustration until I looked up the errata. I recommend that anyone use the code example either downloaded from the website or directly from the book take a look and make sure they get the correct syntax. The only other thing I would have liked to see was a chapter on security concerns of the Catalyst framework (being concerned about security myself), I was disappointed they didn’t show up in the book, perhaps in the next edition. I have noticed (from googling for errors I ran into), that Jonathan is very vocal on forums about helping people, so I have no doubt that the syntax errors will be corrected in a future edition :)

Alright, enough blathering from me, here’s the short and sweet summary: This book is great for Perl or Ruby programmers who are already familiar with MVC development and are interested in the Catalyst framework. The book is not exhaustive by any means, and is not overly long (I would say this is a good thing), it provides a very solid foundation to work with, and a developer should be able to develop his/her own app after reading it. If you’re a Ruby developer interested in a Perl alternative to Rails, or if you’re a Perl developer jealous of Rails, I encourage you to check it out.

P.S. I have also posted this review to Amazon here.

5 Comments to "Book Review: Catalyst, Accelerating Perl Web Application Development"

  1. Perl Coding School » Blog Archive » perl code [2008-04-11 19:50:26] wrote:

    […] Book Review: Catalyst, Accelerating Perl Web Application Development By Lee The book describes ways to use these features to help speed up development and move away from repetitive code creation. In chapters 8 and 9, testing and deployment are discussed. Personally, I would have liked to see the testing and … writequit (:wq) – […]

  2. Jens wrote:

    That is why RoR is so great – they don´t assume you have a profound knowledge of it before you can get started [not saying that it doesn´t help to have a clue about MVC, php, pyhton etc.]. For Beginners that is just great, furthermore you can use InstantRails to get it run and don´t need to worry about issues an expert can easily [or not so easily] solve. Like the force install you mention in your review – resolving dependencies manually is definitely not what attracts beginners :-)

  3. Jonathan Rockway wrote:

    Hi Matthew, thanks for the review!

    Jens: Resolving dependencies is a “fact of life” for the Perl programmer. It’s the price you pay for having other people write your app for you ;) The RoR and PHP mentality seems to be to cut-n-paste code from blogs, while the perl mentality is to reuse code in the form of modules. As modules’ dependencies change, they stop working, and the author needs to fix the module (and the cycle repeats). It can be tedious to be caught in the middle of this, but in the end it’s a big time saver. (Plus, CPAN modules ship with automatic QA tests, so if the tests pass you know the module will work on your machine. It’s better to get a “no, this won’t work” than to get something that’s only half-working.)

    Finally, the book is aimed at people with good Perl proficiency (that already know the CPAN and OO), so it helps if you follow that suggestion. For getting up to speed on Perl, the O’Reilly series is excellent (Learning Perl, Intermediate Perl, and Programming Perl).

    Anyway, sorry for such a long-winded comment :)

  4. Peter wrote:

    I’m not sure why so little emphasis is given to the typo’s and syntactical errors in this book. From what I can see, there’s no way that any reviewer of this book actually followed the code in the examples and built all of the apps, some of them are just plain not-functional via the book’s code (Chapter 5 the DB creation code with “NOT NULL” simply doesn’t work). The errata for this book should not only be recommended, it should be required reading that’s automatically downloaded for you and flashes on your monitor every 5 minutes as that’s how often you’ll need it. In one chapter, there’s a complete sub routine missing, that’s not a typo or a syntax error, it’s a complete omission. Sometimes the author tells you what modules to install, and other times he assumes they are installed (Readonly, Regexp::Common). Another issue, is often you are asked to insert new code into a script, but not told where to do it, typically in programming books this practice is seen as “between the line like X and the line like y insert z code”.

    All of this would not be too big of an issue if the downloadable source code was complete (The chapter5 code doesn’t have the database) and identical to the book code, or if that wasn’t possible (IE: correcting syntax, typos, etc..) contained comments in cases where it wasn’t so a reader would know why.

    In the end, I like the book, but mostly because it’s my only choice for a topic I’m interested in learning. For the most part, I believe most of these issues are actually the result of poor publishing. The author in this case is very knowledgeable and well known on this subject, but the book falls apart due to poor technical review making reading it (and thereby learning catalyst) quite a chore that you really have to want to accomplish.

  5. David wrote:

    Great.Thank you for the Review.

Powered by Wordpress and MySQL. Theme by Shlomi Noach,