Reviews
Aug 29, 2010

Catalyst 5.8: The Perl MVC Framework Book Review

When I first learned PHP in the very early stages of my web-development experience, I thought that PHP was the only server-side language I could use to write my web-applications. Later after that, I figured out that you have many languages you could write your web-application in: Python (most likely with Django), Perl (with hopefully using Catalyst), and Ruby being the main ones. When Packt contacted me about their recent Perl book regarding Catalyst 5.8: The Perl MVC Framework, I immediately took on the challenge to have the first book review on Tech Cores. I've had this book for around a month now, and after all of that time, I've been through the book a couple of times to make sure I know what they covered.

So on with that and here's my review of Catalyst 5.8: The Perl MVC Framework.


My Background with Perl

I have to say from the start, that I am by no means a Perl expert. Perl happens to be one of those languages that I've used only a few times. But I'm no Perl dummy either; I just... let's say, don't have the experience most guys have at it. I only know some of the very basics of Perl.


What the Book Covers

After I finished the book, I was very impressed on how much is in a 228 page book. In Catalyst 5.8: The Perl MVC Framework, they covered every aspect of what a web-developer needs to learn how to use Catalyst 5.8.

Here's a simple run-down of what this book covers:

  • How to install Catalyst and use CPAN
  • Learning all the files in the application directory and what their purpose is
  • How to add a view
  • Adding a database and installing SQLite
  • Setting up your basic index page
  • Creating web forms
  • Authentication and authorization
  • Parsing through a database and displaying information in a web-friendly way
  • Use of the filesystem module
  • Creating an API using REST
  • Implementing AJAX in your web application
  • Creating a RSS feed
  • Covering quite a bit of functionality in Moose
  • Setting up your own web-server
  • And testing your web application
  • And more!

That may sound like a lot for such a small book, but Antano Solar John, the author, did an amazing job at making sure everything ties together and really fits in an excellent place. There wasn't one bit of text that felt out-of-place or that it didn't belong in that chapter; in other words, it's very easy to follow along.


Reference

While working with Catalyst 5.8 on my own web-server, I've really learned quite a bit from Catalyst 5.8: The Perl MVC Framework. Creating a "Hello World!" application and following along with everything used in the book is a very easy thing to do. The author makes sure that the code being used in said application would be able to be used in another application; in other words, none of the code is application-dependent and could easily be ported to a new application.

After I finished the book, I ended up with a "Hello World" with Twitter compatibility. Call me crazy for implementing Twitter in a "Hello World!" application, but hey, it was fun to do.

Also, Catalyst 5.8: The Perl MVC Framework provides some free source code to help you follow along with a book and learn from the professional Perl code.


What an Amazing Book

I honestly believe that the author did an amazing job making sure a new user to Catalyst would be able to install, set up, and even deploy their Catalyst application to make it work on any server. In the book, he even wrote about Mac OS X, Linux, and even Windows support on how to install all of this wonderful server-side software on your computer so you can even follow along and run the source code that's provided with the book. That's one big plus for any new Catalyst user and for me, because I'm not the best at it per se, it was truly a big help for me being a new user to Catalyst and even Perl.

For a good portion of the book, it guides you through to set up an entire address book that's fully editable using a SQLite database and how to even create a fully working blog. For these two real-world examples and with all the harder topics being discussed like authentication, this will help quite a bit of web-developers out there looking to use Catalyst for their web applications.

While speaking about real-word examples, Catalyst 5.8: The Perl MVC Framework covers a couple of things I have difficulty with when using PHP to build my web applications: sessions, REST (API), and AJAX. With Perl modules like the FormBuilder, I have no idea why people even bother writing their forms in raw HTML these days. Because I'm a PHP guy myself, I've learned one thing from this book that might just get a hard-core PHP guy to switch over to Perl: Perl with Catalyst 5.8 makes hard things very easy things to do, it speeds up application programming development big time with using all of the modules available on CPAN, and it even helps with database management by converting a SQLite database into a "Perl-friendly" way of manipulating that information. No more of using "SELECT * FROM...", you can do that and even more easily with Perl.

This may sound old school, but Catalyst 5.8: The Perl MVC Framework also provides quite a bit of images in the book to make sure your website is looking the way it's supposed to and see what's coming up next. A text-only book can get quite a bit boring and with these images is spices things up.

As you can see, I've learned quite a bit from Catalyst 5.8: The Perl MVC Framework and I think Packt might of just made me switch to Perl for one of my upcoming web-projects.


Hey, Nothing's Perfect

There has been some cases in Catalyst 5.8: The Perl MVC Framework where they use some "un-supported" Perl modules from CPAN. The main thing I'm speaking about here is TTSite. I do have to say this though, when the author decided to use some "un-supported" Perl modules, he clearly states that and sometimes even provides some alternatives that he won't cover in the book. Now some developers can argue the using an "un-supported" module is a bad thing, but I beg to differ. It's great that he discusses Perl modules that are like that, but it might be best if he spent about a page or two to give you a run-down of how to do the same thing without that "un-supported" Perl module (for example, using the highly supported, Template Toolkit). Because Catalyst 5.8: The Perl MVC Framework is more geared to beginners, it might be best to not cover "un-supported" modules because if something goes wrong, they might not be able to get out of that hole.

Another thing that really struck me while reading the book is that there are quite a bit of links in this book going to external websites like CPAN. It may be best if Packt invented a very basic URL shortener so the readers of the book don't need to type in those long links. I would love to visit them, but I would rather not type all of them in my address bar to be fully honest. There's much room for error when typing any URL in, and if there was a simple URL shortener, even Bit.ly, it may be very beneficial to the reader.

I don't know if it's only me, but some of the code formatting is a bit off and because it's a book, it needs to wrap. It may be best to show a arrow, like in this screenshot, to tell the user that the text was being wrapped there. I find that's needed for any book with large chunks of source code in it.


Overview

As this is one of the first Perl books that I've ever owned/reviewed, I have to say that it is made for beginners. But just for a warning, the book is not meant for learning Perl development. The author assumes you already know Perl and that you wish to expand your Perl knowledge with web-development using Catalyst 5.8.

I would have to highly recommend that you would take a read at this book if you are a Perl developer looking to use your web-development skills and Perl skills together to create one awesome Catalyst application. Catalyst 5.8: The Perl MVC Framework focuses on almost every aspect a web-developer needs to know to create even the most advanced websites. So if you're looking to take on Facebook or even YouTube, this book will give you some of the knowledge to write it using Catalyst!

If you're interested to read more about the book, click the following link -- Catalyst 5.8: The Perl MVC Framework or to view more books provided by them, visit Packt!

Stalk me on social media! Any other way would just be creepy…