Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rjbs (4671)

  (email not shown publicly)
AOL IM: RicardoJBSignes (Add Buddy, Send Message)
Yahoo! ID: RicardoSignes (Add User, Send Message)

I'm a Perl coder living in Bethlehem, PA and working Philadelphia. I'm a philosopher and theologan by training, but I was shocked to learn upon my graduation that these skills don't have many associated careers. Now I write code.

Journal of rjbs (4671)

Saturday February 16, 2008
09:30 PM

a review of the catalyst book

[ #35676 ]

In the index for "Catalyst" book, you'll find no entry for model, controller, action, dispatch, or ActionClass. These are some of the most fundamental concepts in Catalyst.

Many technical books suffer most because of those elements that are outside of the author's direct control: weird layouts, weird typographical conventions, and lousy indices. Knowing that, I'd never base my criticism of a technical book on the failings of its index. The failings of "Catalyst's" index, however, are telling about the failings of the book as a whole.

If it were only the index that lacked this information, it would be a minor problem. Unfortunately, there really is no comprehensive explanation of any of these topics. Though there is an entry for "View," it is explained in as little detail as the rest of these concepts.

Pages 6 and 7 provide about one paragraph each for the concepts of MVC, Model, View, and Controller. From there on, the book focuses on implementing specific tasks without explaining much of the concepts that are used to do so. Actions aren't so much explained as implied to be subroutines with attributes. While nearly all of dispatch in a simple Catalyst application is determined by a few named and attribute-laden subroutines, these are not even presented in a bullet list, let alone explained in any detail.

Instead of starting with an explanation of how the fundamentals works, Rockway works through specific, practical examples of application implementation. These provide a demonstration of quite a few of the things that one can do with Catalyst, and occasionally some explanation of why it works. The explanations are not systematic, however, and concepts are presented out of order rather than in a logical progression. By the end of chapter two, the first chapter with any specific examples, the reader is installing and using Template Toolkit, SQLite, and DBIx::Class. Views are defined as bits of code that produce output based on the content of the "stash" on page 20, but the stash itself is not given any explanation until five pages later. This kind of confusing presentation prevails through most of the book, and is sometimes rendered more confusing by the inclusion of huge code samples, some of which dominate three consecutive pages.

Some concepts are well explained. The section on chained dispatch was clear and concise, though basic actions and dispatch remained unexplained. The section on the REST ActionClass was clear, and I found it to be the most interesting section of the book.

The book desperately needs reorganization, both by inclusion of an explanation of the fundamental concepts used in Catalyst design and by reordering the presentation of material to present concepts in a logical order with no long gaps between items that belong together. Finally, a few segments could probably be dropped entirely, or at least moved further back into the book. Explanations of FormBuilder and BindLex, for example, might have been interesting and useful for the creation of serious web applications, but they are instead presented without much explanation in chapter three, where they just serve to further confuse the subject at hand.

The Catalyst::Manual documents seem to provide much of the same information, and at no cost. They also include some of the concepts that are missing from the book. Although I think a second edition of "Catalyst," or a second book on the topic, could be a very useful book to introduce new users to Catalyst, I don't think this book has much value beyond that of the existing free documentation.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Well, buying the book helps support the project, and despite the problems you list, if you've never looked at Catalyst (I haven't), it's certainly a powerful incentive to anyone labouring over the construction of web apps to think much more in terms of automating construction of code, and text-based CGI field definition. And it's definitely a good thing to have such documentation, free or otherwise.
    I don't reject you criticism, but I'd also add:
    (1) Some specifically used concepts, e.g. $c->detatch(), des
    • First, people like rjbs are not probably the intended audience for the book. It's probably for beginners, and what beginners want to do is get a web application working rather than understand what they are doing.

      The idea is to change the world, rather than to understand it. (Karl Marx)

      > (2) Catalyst is a sophisticated framework, and
      > hence operates at a very high level of
      > abstraction, which means I'd be reluctant to
      > introduce beginners to it. They'd simply be
      > having to learn too much at on
    • We're collecting errata on the new wiki [thttp] (which will move onto the main Catalyst site soon).
  • I also have a Catalyst book review I'm finishing up and I plan to post it soon. I agree that the book is aimed at Catalyst beginners. It's far more about "how" instead of "why". This means that the author doesn't have to spend a lot of time explaining core concepts (such as MVC) and can focus on the practicals, but if people need those core concepts, I still think the book has merit because they can pick up a lot of those concepts by osmosis (perhaps I'm overly optimistic).

    The book has a number of weak