Catalyst: May 2009 Archives

You've read the tutorial but you still can't seem to get a grasp on what exactly to use Chained dispatching for.

Chained is just another method of method/url dispatching that Catalyst allows you to use. Chained, however, allows you to chain together methods that need to share information across requests....

Those of you who are not regulars on irc.perl.org or don’t hang out in the #catalyst channel might not be aware of this, but the discussion, planning and chanting was going on for a while. With the recent rise of Devel::Declare this discussion has flamed up again.

There are many people thinking about how to design this, and even some implementations are already around. I’d like to use this article to discuss my own take on how a declarative Catalyst might look like.

Ok. So you've heard of Reaction. You've read a blog post or two about it. You've even taken a crack at reading the fine manual, but you still don't quite get it. Don't feel bad. I was in the same boat as you.

The manual does a fine job of explaining how Reaction works. It does a pretty good job of telling you how to build bits of Reaction code. It doesn't really explain what Reaction is for and why you should care.

I spent some time discussing this with one of the folks who wrote the majority of the Reaction documentation. My questions were all over the place but they boiled down to one thing: 'Why do I care?' I finally had the 'AH HA!' moment about 2 hours in to the discussion.

Reaction provides a way for you to easily plug-in features into your Catalyst app with minimal effort. It allows you to build new features in a distributable way that allows for per-app customization while maintaining a clean base set of code.

Reaction takes DRY (Don't Repeat Yourself) to the next level. DRY usually applies on a per-application basis. Features built using Reaction become mobile between applications and even distributable via CPAN. The best part is you can still customize them without editing the distributed code.

That's why Reaction is interesting. It gives Catalyst authors a way to share their features with each other, and across their own projects.

When you build a web application with Catalyst, your controller will retrieve data from your model (or operate on it), prepare it, and put it in the stash so the view can access it. Your layout will be organized by templates that load more or less reusable subtemplates.

Reaction on the other hand comes shipped with its own UI system. In this post I will try to describe its components and how they interact.

Sponsored By


Ionzero: Rescue your dev project.

Following

Not following anyone

Note to spammers: all comments are moderated. Don't waste your time