Blog Upgrade

The software that runs this blog has been letting me down. After some consideration, I decided that instead of switching or rolling my own, I'd be like the guy who soups up his Ford Pinto wagon (COREBlog in my case). New wheels, new paint, and tinted glass. Later, maybe, new seats and sound system.

On the programming side of the upgrade: new, permanent, hackable, readable, and indexable URLs. The old URLs, formed like:{id}

sucked. There's just no way around that. They were hackable in that you could increment or decrement the id to get subsequent or previous entries, but had no other virtues unless you count (and I did for a while) their extreme shortness as a virtue. Now, the URLs are changed to:{id}/{slug}/

Keeping the id guarantees uniqueness and preserves hackability. A slug derived from the entry title -- in this particular case "Blog Upgrade" -> "blog-upgrade" -- provides a tiny bit of context to aid web surfers and indexers. I changed not a thing in the ZODB. All I've done is reimplement __bobo_traverse__() for COREBlog.Entry so that the proper object gets published on a slug-ged request, and reimplement index_html() for the same class to redirect to the new canonical URL. If an agent comes for a deprecated URL, it gets a status 301 response with the new location:

sean@lenny:~$ curl -v
> GET /blog340 HTTP/1.1
> User-Agent: curl/7.15.4 (i486-pc-linux-gnu) libcurl/7.15.4 ...
> Host:
> Accept: */*
< HTTP/1.1 301 Moved Permanently
< Date: Mon, 15 Jan 2007 20:29:47 GMT
< Server: Zope/(Zope 2.8.6-final, python 2.4.3, linux2) ZServer/1.1
< Content-Length: 0
< Location:
< Content-Type: text/plain; charset=UTF-8

On the policy side: new, full-content feed of entries. I'm optimistic that this will increase the depth, if not the breadth, of my readership. Any any rate, I'm not selling ads on my blog pages, so there's nothing to lose.


Re: Blog Upgrade

Author: Allan

I noticed the new styling a while ago, it's looking good!