P16: a blog by Matt Kangas home archive
06 May 2008

Google App Engine - First Impressions (one week in)

One week ago I said I was diving head-first into Google App Engine development. 'Tis true! I've now gotten my feet and head thoroughly wet. :) Here are my first hands-on impressions of App Engine as a web programming model.

I am porting an app that was already half-written in KohanaPHP and CouchDB with a custom, half-baked modeling layer. Roughly speaking, it is a Craigslist clone: an online classified listing site. Nothing revolutionary, this kind of site has been built a hundred times. I have a specific niche market in mind, and I hope to launch it soon.

Since Craigslist is arguably the simplest useful, high-traffic site on the internet, this seemed like a reasonable test of App Engine as a hosting platform. To put it another way -- if I can't recreate Craigslist on this platform, what good is it? :)

My initial port to App Engine took just one day of furious hacking. I made progress very quickly, thanks to the documentation and code samples. Within 24 hrs I had my Kohana templates converted to Django templates, my core entities defined, authentication working, and some bare-bones request handlers written using the provided "webapp" framework.

The main stumbling blocks I encountered at this point were:

As I dug further into the examples I was disappointed. It seems like the examples were "crowdsourced" from within Google. None are really written in a "best practices" style. They're mostly just quick demos. One doesn't even work due to missing packages. ("muvmuv" -- still broken in SVN, afaik.)

There were some bright spots. "cccwiki" showed me that path arguments are feasible -- but it's not mentioned in the online docs. "tasks" is a collaborative task-list app that uses entity relations elegantly. "django_example" shows how to run the Django dispatcher and middleware -- which I'm steering clear of for right now.

I'm still wrapping my head around Django forms and modelforms. I'm annoyed that templates add silly excess newlines to HTML output. But form_preview looks so darn cool... maybe cool enough to overlook those other warts.

However... the single best thing that I've found so far is "Ritveld", a demo app written by none other than Guido van Rossum.

(Guido is the father of Python, if ya don't know...)

The Makefile alone was a revelation and time-saver. The app seems to be written in immaculate, canonical style, as I'd expect from GvR. Looks like I found a demo worth emulating. :)

I am going to the Google "Hack-a-thon" in NYC tomorrow, will report back afterward!