Interview to Sebastian Riedel (Catalyst)

Catalyst (http://catalyst.perl.org/) is an Elegant Web Framework, supporting the MVC pattern, as well as a number of experimental web patterns. It's heavily inspired by such frameworks as Ruby On Rails, Maypole, and Spring.

Sebastian Riedel, member of the Core Developer Team, is our guest in this CaFe Perlisuue

Please Sebastian, introduce yourself to the CaFe.pm group

My name is Sebastian Riedel and i'm a 24 years young Perl5/Parrot/ Perl6 hacker living in northern germany.
I learned Perl about 5 years ago, and work as a Perl developer for T- Systems International now.

Which one was your motivation to build Catalyst ??

It started after i maintained Maypole for a few months, i fastly got to the conclusion that there were too many flaws in the design, like the built in crud actions, too tight TT/CDBI integration, request but no response object, quite static uri/action mapping... People used very ugly hacks to wrap their apps around Maypole and it's crud, which resulted in much more work and nearly unmaintainable code.

So i decided to rewrite it from scratch.
It all moved too fast for the majority of Maypole users, so i had to pass maintainership, and made a fork which we named Catalyst.

Many of the old Maypole developers followed me soon, and the new codebase attracted even more new ones.
Today i'm very happy Catalyst is much more popular than it's predecessor.

What skills (Perl related or not) did you gain while you build Catalyst ??

I learned very much about pre 5.8.x release bugs. :) Catalyst is Perl feature wise very much on the bleeding edge, using attributes, multiple inheritance and stuff.

I also studied all the other frameworks on the market like Ruby-on- Rails, OI2, CGI::App, Struts, SpringMVC, Seaside... to steal all the good features. :)

Which strngths do you found in Catalyst that aren't found in other similar projects ?

The feature i'm most proud of is the uri -> method mapping, imo no other framework on the market has it so elegant.
Most frameworks just use a fixed scheme like /class/method/arg and rewrite incoming uri's with something like Apache's mod_rewrite, in Ruby-on-Rails it's called Routes.

Here are some Catalyst vs. Ruby-on-Rails examples. :)

vs.

class FooController < ApplicationController

def bar
end

end

vs.

class FooController < ApplicationController

def bar
end

end

ActionController::Routing::Routes.draw do |map|
map.connect bar, :controller => foo, :action => bar

vs.

class FooController < ApplicationController

def bar
end

end

ActionController::Routing::Routes.draw do |map|
map.connect index.html, :controller => foo, :action => bar

Have you detected that any module generated by the project was used outside it ??

Oh yea, especially HTML::Prototype is quite popular.

Do you plan to release some modules as a Catalyst spin-off ??

We did it in the past with Module::Pluggable::Fast, HTML::Prototype... and are already working on new ones like HTTP::Body and DBIx::Class (not really a Catalyst spinoff but part of the family).

Which ones were the limitations that Perl imposed to the project ?

Recently we've been experimenting with asynchronous action processing (think POE) and Seaside- (Smalltalk MVC) like continuations as a replacement for plain old sessions, but came to the conclusion that it's much too hard to implement using Perl5.

I'm really looking forward to Perl6, which will make all this dead simple. :)

Do you have any opinion or advice regarding to Perl 6 ?

Use it! (http://pugscode.org)

For a newcomer will you ancourage him/her to forget about Perl 5 and just start playing with Perl 6 ?

Not yet, the current implementation (Pugs) has already a high level of quality, but there are still bugs and missing features. And don't forget about the lack of treeware.

What advice will you give to the wanna be designers and hobbists facing a new project ??

Don't get lost on details, try to give it a well designed api and just make it work, so you can release early, release often. If it's good enough, more people will join your project and clean it up for you. :)

This doesn't mean write ugly code! :)

In which parts of the code you will advice to the novice Perl coder to look at, in order to have a very pleasant learning experience ?

Well, we just had a discussion with perrin on perlmonks about that, there are too many advanced techniques in the Catalyst code, so that i wouldn't advice novice coders to look at it.

It's easy to use by a novice coder, but not to understand it's internals.

How can anyone colaborate with Catalyst ??

Just join #catalyst on irc.perl.org and/or the mailing list, http://lists.rawmode.org/mailman/listinfo/catalyst

Are there any preferred skills to collaborate in Catalyst ?

Yes, IRC is a must have skill, since we discuss nearly everything on our very active channel #catalyst (irc.perl.org)... :)

What features you think are missed, and which ones will you add soon ??

Actually i'm porting Catalyst to Perl6.

But i'm by far not the only one working on Catalyst, in fact most commits are by other members of the team these days. New plugins are emerging every day. :)

Any favorite CPAN module ??

Many! :)
Devel::ebug
SVK
LWP
Test::Pod
Test::Pod::Coverage
Template::Toolkit
HTML::Mason
Class::DBI
DBD::SQLite
Inline
YAML
Locale::Maketext::Simple
Class::Accessor::Fast
Class::Data::Inheritable
POE
DateTime
RPC::XML

Do you have any experience (funny or not so) that you had while making Catalyst and that want to share with us ??

There are some points that come to mind.

Since current web framework developments are mostly dominated by Ruby folks i had to deal with them a bit, and i find it quite amusing how they try to advertise the lack of alternatives as a feature, in contrast to our TIMTOWTDI.
Even more funny is that other Perl frameworks prefer to imitate Catalyst rather than join forces and produce a single superior one. Not that i dislike competition, but i'd prefer them to develop new features for us to steal. :)

plants