Dorward's Ramblings

Github and Axford

Published on

I've been drinking Kool-Aid, lots and lots of Kool-Aid.

First up is Git.

During my stint at Playfire, I learned to love this piece of software. It was the first time I've worked with a team who used version control properly, and Git is a rather nice example of the breed.

Next, and closely related, is GitHub where I arrived hot on the trail of a herd of former and current Yahoo!s.

GitHub offers free Git hosting, and wraps it with a great little social networking website. The benefits are numerous, and include:

  • Everyone can see your code (unless you want, and pay for, a private repository). This in turn:
    • Invites comment
    • Means your code is already out there if you want to explicitly ask for advice on something
    • Lets you point people to it to answer questions with "This is how I did it"
  • Your friends get notified about your projects, which encourages them to chime in. I received some useful advice from Mike Davies this morning.
  • Pretty charts! (Everyone loves pretty charts)
  • A nice interface to see the history of a project
  • The ability to edit files over the web — handy for those times when you spot a quick chance you want to make while away from your usual development environment.

Neil has a little to say on the subject of Git and GitHub in his blog entry "Why git?". Mike West also chimes in with "I ♥ GitHub", and Steve Webster has written "Motivate yourself by doing it in public".

Then we have Catalyst, a nice little Perl framework. I've been planning to learn my way around it for some time, but previous attempts have always been aborted thanks to various distractions.

My reasons for diving into Catalyst once more can be summed up as "Education and Comments".

As far as Education goes, its a good way to practise my Perl and get to grips with one of the more popular developments in website authoring using the language.

As for Comments; I've had this blog for a number of years, and it still doesn't have a comment system. This is thanks to to the way that it evolved from a website which needed very little in the way of dynamic code and thus consists mostly of static files.

My existing CMS, sBuilder, runs on a machine I have at home whenever I add new content. It spits out a collection of static files, which then get rsynced to the server hosting the site. A separate script handles periodic regeneration of the homepage (which pulls in content from a number of feeds around the web).

Enter Axford, a reinterpretation of the existing system but dynamically generated.

I started by taking my existing database structure and rewriting the DBIx::Class based model of the data. The main difference between the old and the new is that I've learned how to use relationships and to generate SQL using SQLFairy.

Since then I've made quite a few changes, including the mapping of my existing URI structure onto Catalyst (thanks to $c->detach) and the replacement of my home-brew Table of Contents generation with HTML::Toc.

Switching to HTML::Toc was a little painful, but code reuse is good (and its based on HTML::Parser, which is rather faster then HTML::TreeBuilder which I tend to use by default since I like its DOMish approach).

So, Git, GitHub, Catalyst, DBIx::Class, CPAN — that is a lot of Kool-Aid. Some of it new, some of it just laid down for a while and made all the more refreshing for doing so.