Tuesday, August 8, 2006

Homebrew Weblog

You are reading this on my new weblog, written using:

  • TurboGears - a web application "mega-framework," consisting of:
    • CherryPy - web app framework
    • mochikit - JavaScript library
    • Kid - XML-based templating
    • SQLObject - Object Relational Mapper
    • json-py - JavaScript Object Notation (taking the X out of AJAX)
    • Other good stuff I haven't used yet
  • Python - super-slick programming language
  • MySQL - a database
  • reStructuredText - a component of Docutils, for markup in comments
  • Vim - the editor
  • Apache - the app is proxied behind the Apache 1.3 web server

Briefly, TurboGears is a Rails-like framework written in Python, rather than Ruby. The idea behind TG is to gather the parts necessary for a framework from established projects. The result may be less integrated than Django, another Python Rails-alike, but maybe the result is also a bit more robust and flexible. Or maybe not. I'm not making any religious statements here. Perhaps I'll prefer one or more of these other tools, when I get a chance to try them out. I'm enjoying working with TurboGears for the time being, though I'm looking forward to the day when the documentation catches up with the software.

The design of my weblog is fairly straight-forward. As opposed to my old weblog, the entries can now be classified in more than one category (using more than one tag). Also, I did decide that I wanted to keep managing my posts from the command line, using my editor of choice. (Boo on web forms, 2.0 or otherwise.) So behind the scenes, I have a handful of python scripts that let me post, update, etc.

One feature you don't see yet. I have the ability to create Hyper-link objects that are tagged in the same way the articles are tagged--sorta like del.icio.us. I haven't created any such links yet, though, and I haven't made a place in the site templates to present them either.

Somewhere on the site, I've cleverly hidden the comments form. See if you can find it! I'm actually not all that happy with my comments design. It's just utterly gratuitous AJAX (well, I use JSON instead of XML, because that's how people seem to do things in TurboGears). I wanted to avoid creating separate pages for the permanent link and for the comments, but I also didn't necessarily want the comments cluttering up the permanent page. So I did this. It's all right, I guess. It's just not super-obvious where to go to make comments.

This is still a work in progress. Next up is a re-design of the look of the site. I'm learning CSS--going to see if I can get rid of all of the tables. (I've already looked for inspiration at one of my favorite weblogs, Tim Bray's ongoing (see the what and when links) and will probably look for more. It's weird. When I first started visiting Bray's site, I found it a little confusing. Now it seems just about right.)

Anyhow, I want to make my management scripts a little more--how you say?--robust. And I want to improve that comments form--give you the ability to preview posts, edit them for a few minutes after posting, that sort of thing.

So here it is. Let me know if you find any problems.

6 comments:

  1. Imported on behalf of: Criss
    Sneaky!

    ReplyDelete
  2. Imported on behalf of: Lee
    You should win a prize or sumpin'!

    ReplyDelete
  3. Imported on behalf of: Dan
    I thought I was stupid before. Turns out I just had scripting disabled.

    ReplyDelete
  4. Imported on behalf of: Lee
    If you tried it using Internet Explorer (and I'm not trying to insult you here), you'd also have run into problems. Turns out IE doesn't like innerHTML in an XHTML document. Fixed now with painful DOM manipulation.

    ReplyDelete
  5. Imported on behalf of: Mike Jasper
    Hey! Found it! Makes sense, in its own way...

    ReplyDelete
  6. Imported on behalf of: Lee
    It maybe makes sense, but it's not what you expect. I'll make it better at some point. Thanks for dropping by!

    ReplyDelete