Don't lose your wiki changes ever again

For the umpteenth time, I just lost a bunch of documentation I was writing into a wiki page (big textarea) when I tried to use some emacs shortcut keys and accidentally navigated off the page. One of the nicest features of SocialText is that they nag you if you try to navigate away without saving changes.

Anyway, finally installed It's All Text so I can edit in my editor and prevent this from happening again.

Monday September 08, 2008

12:21 PM

Book Review: Catalyst

In a time when less experienced users are experimenting with web frameworks for development, Ruby on Rails has gained notable marketshare in the area of easy set-up and minimal configuration. As one of many Perl-based frameworks, Catalyst operates in the same space and for many new users will be measured by this same quick-configuration criteria. So it follows that many users will want a book that will get them up and running quickly.

The Catalyst book succeeds in getting to the point quickly and diving in. Chapter 1 gives you a very quick overview of Model-View-Controller (MVC) architecture. Chapter 2 then starts with a simple Catalyst application, essentially a 'Hello, World' application. Keeping with the goal of easy configuration, the initial set-up involves running a script to create the core application framework. The rest of the chapter then walks through each directory that script created. I liked this high-level description because it's common for MVC frameworks to have many files in many different places and you don't often find a comprehensive overview in most documentation.

Even with tools for fast configuration and convenient interfaces, the reality is that there are still many decisions you need to make when creating even a fairly simple web application. And each decision offers plenty of wrong choices to an inexperienced user. "Catalyst," the book, does a good job of presenting the common best practice for decisions ranging from basic database setup to reusable code design.

These design decisions are presented in a quick matter-of-fact way without going into full discussions of every area. This was the right decision to make for a book helping you to get running fast. If you're looking for more in-depth disussion of different options for session handling, authentication/authorization, database design, or other web technologies, you'll need to look in books dedicated to those topics.

There is no question about the credentials of the author. Jonathan Rockway is a key member of the core Catalyst team and has been giving Catalyst presentations for years. This experience shows as the advice and best practices offered throughout the book are solid.

The first real sample application described is an address book. This is a good choice as it is something anyone can relate to and naturally fits a CRUD framework. It also builds nicely, starting from very simple features, like getting data in and out of your address book, to other typical features like external configuration files, sessions, and authentication and authorization. Many of the features demonstrated here could be easily re-implemented in any web application you might be building.

The book then transitions to a more complex sample application, a tool to track opinions on IRC. It can track people with multiple different nicks across multiple different channels. Once it has some data, the book shows how to build interfaces that can show various data on the positive and negative comments around various topics.

While the example did a good job of demonstrating Catalyst features, I was puzzled by the choice of IRC as the problem space. My impression is that IRC is very much still a tool used rarely outside technical communities. If the book hoped to reach a wider audience, some of whom may be new to programming, this example could be a stumbling block. For someone not familiar with IRC, I think it would be difficult to focus on the Catalyst code because they would be trying to wrap their head around what IRC is and exactly what the sample application was doing.

As with any techincal book, it contains a significant amount of raw code. Of course it needs to show you the code to demonstrate how to do things and describe what's going on. However, I found myself wondering if there were a different way to provide some of the code samples, perhaps as an appendix, at the end of the chapter, or as a download. For completeness, you want all of the code provided in the book, but I think people seldom type everything in from a book, so it seemed some sections could have been pared down.

As with any technical book, examples can become out of date after printing, and there are some cases here. Errata are posted on the Packt Publishing website and there is also a wiki hosted on the Catalyst website. I imagine it could be frustrating for a new user working through the early examples (in Chapter 3, for example) without referring to these resources.

Any book has it's share of typos that get past the editors, but I seemed to notice a few more than typical, especially toward the end of the book. I don't know that any of these would cause any serious issues in understanding, but they can be distracting.

Finally, if you are interested in some newer web development technologies like AJAX, REST, and RSS, the author has you covered. There is a chapter devoted to these technologies and additional supporting technologies outside the Catalyst framework to get you going.

As an introduction to Catalyst, and MVC web development, this book succeeds in getting you going and explaining all of the key features you need for web application development. However, some might find the cost a bit steep (list US $39.99, $35.99 on Amazon) for a fairly slim volume. My recommendation is if you know you are going to be doing development with Catalyst, "Catalyst" the book would probably be a useful reference and you'll find many of the examples reusable. If you are just dabbling with Catalyst, you can probably get the introduction you need from the online documentation available on the Catalyst website and the Catalyst framework documentation.

Google SoC FAQ Session at UB

As you might know, The Perl Foundation is participating in the Google Summer of Code this year. I work at the University at Buffalo and it turns out the release manager for FreeBSD, Ken Smith, works here too. So we decided to get together and hold a FAQ session for any students who might be interested.

perldoc.perl.org for docs

For some reason, I had it in my head that there were issues with perldoc.perl.org like spotty performance or something. Don't recall why I thought that, but recently I saw a posting that it had been updated with the perl 5.10 docs. I recently needed to look up something for perl 5.8, but figured I'd give it a try.

YAPC::NA in Chicago...again!

Chicago.pm has stepped up to be first group in recent years to bid for a repeat YAPC, and in close voting they nudged out Columbus for the opportunity to do it. Jonathan Rockway will be the head organizer, with support from previous Chicago organizers Josh McAdams and Pete Krawczyk.

Both groups submitted strong bids and it was a tough choice.

Watch for more announcements with final dates and other details. See you in Chicago!

oracle.com is down

It's 7:54 AM EST on a Thursday morning and www.oracle.com is showing this message in plain black text on a white screen:

An error occurred while processing the request. Try refreshing your browser. If the problem persists contact the site administrator

First, I can't believe oracle.com is down. How is that possible? It must be the application code because Oracle is unbreakable, right?

But I'm just as amazed at how bad that error message is. Not even formatted with an Oracle logo. I don't even know that I'm really hitting Oracle. Then again, when your system is unbreakable, why would you spend time formatting error messages?

Help Wanted: Care to hack on a google calendar script?

In case folks don't read the TPF blog, I need someone to help me out with a script that grabs info from the Perl calendar on Google calendar. I've got it started, just don't have the time right now to polish it.