Catalystic conversion - part 0

autarch on 2007-03-02T01:28:37

I've recently started working on converting/rewriting an existing site/application, VegGuide.Org, using Catalyst. I've been working on a new UI for the site for a long time, but I've not been too enthused about working on it. I'm hoping that doing something more new than just a new UI will increase my enthusiasm. It's also an opportunity to throw out a lot of crufty code, write some tests, and generally do something better.

The existing site uses Mason & MasonX::WebApp as its controller and view. Mason's built-in controller stuff is not very flexible, and while MasonX::WebApp increases its flexibility, it's still a hack on top of Mason. I like how Catalyst's controllers work much better. I'll still be using Mason as my templating engine [1].

I'm also planning on keeping the existing Alzabo-based model code. That part works fairly well, and forms a good 50% of the app, so changing that would make this a complete rewrite, and a bit overwhelming. Once Fey is ready I'll tackle the model code.

One of the goals is to make the system REST-y. That means changing the URI structure, and providing non-HTML input/output, and of course using the other HTTP verbs. My hope is that this might inspire people to make VegGuide mashups or something like that, and I just like the structure it provides in the URIs of an application. I'm a little perplexed about things like editing forms, but I think the idea is to make those nouns hanging off of other nouns, like /entry/42/edit_form. I think that's REST-y, since the URI is a noun, but it feels a little weird. As a bonus, the REST-y stuff should make it easier to think about sensible caching for the site, which should make it snappier for end users.

My plan is to continue blogging about this as I go, talking about the things I like about Catalyst, and what annoys me.

1. I've used TT2 a fair bit at work and I really don't like it, so it's not just my bias as a Mason maintainer, but that's a post for another day.