January 7th, 2007

default, pepper

Let them eat CakePHP

So I’ve been back at work and starting on a new project—actually, a re-implementation of an old one—for which I’m exploring CakePHP, a “rapid development framework” which is, shall we say, heavily inspired by Rails. Why not just use Rails, you may ask? Well, mostly because I’m the only person at the company who knows Ruby and I don’t know it all that well. (On the flip side, CakePHP’s documentation isn’t as good as Rails’ is.) Also, as many Hipster Points as Rails garners, it is neither easy to deploy nor lightweight when it’s running. (The currently-preferred method of running it is with a hybrid mostly-Ruby web server called “Mongrel,” which in practice tends to run in addition to a standard web server on a box. bigtig asked the reasonable question the other day of why it isn’t deployed with Apache and mod_ruby; AFAIK, it’s because mod_ruby used to have performance problems and a tendency to lose its brain if you ran more than one Rails application at a time with it, but I think those have been solved now.)

Cake does look like a well-designed system, although it’s occasionally an inadvertent demonstration that Ruby really is a more elegant language. (A language more elegant than PHP? Say it isn’t so!) To try to make sure what Ruby I’ve learned doesn’t get too fallow, I’m writing the script to convert from the old database format to the new one in Ruby; it’s not a straight one-for-one mapping, since I’m not only using column names Cake (or Rails) will like, I’m doing a bit of database normalization along the way, giving some data fields their own tables and index keys. So the script will have to build those tables and the relations. Not a huge thing, of course—just enough to remind me how much Ruby I’ve forgotten.

Also on the geek front, I’m taking Tuesday off next week to go to MacWorld, even though just to the exhibition hall, not the keynote. (I have a free floor pass.) In theory after that I’ll be trying to get to the Apple Store in San Francisco for a taping of MacBreak Weekly, hosted by former TechTV guy Leo Laporte and former friendly college acquaintance of mine Merlin Mann, who is one of the only people I’m aware of who seem to have made a career out of being an internet personality.

Meanwhile, Panera Bread marches ever closer to the house—they’ve opened a new location just across from the closest Fry’s Electronics, so I’m sitting here with a cup of coffee on their free wi-fi. In theory, though, I’ve come here to see if I can get some writing done on things other than journals (and Ruby code for work).