Introducing gibe

On and off over the last two weeks I've been developing gibe, to replace vellum as my web log software.  Gibe is written in Python (of course), and uses the TurboGears web-based development mega-framework.  Well, with an alternate set of tools - Routes for dispatching, Genshi for templating, and SQLAlchemy for database connecitivty and ORM, to facilitate my learning  of these tools.

How has it been going?

Well, Genshi really helps to ensure valid HTML everywhere.  Vellum's templating system, unfortunately, was one of those build-it-with-strings and occasional embedded Python code.  Genshi's XML-based templating is spot on for almost all uses - separating a list with some character is not one of those, although I found a nice solution for that.  It does silently swallow certain types of errors, which is quite confusing, and also quite surprising in a Python module.  But the HTML sanitiser is really great, and I can see myself writing a few filters for it, and maybe writing some code to make applying filters to particular streams in a larger template easier (to make a comma-separated list relatively trivial).

I've become a total Routes convert, especially as I have been contemplating the plugin architecture I want to add.  Currently, I have a couple of routes added to provide backwards-comaptibility for Vellum URLs, and these could trivially be done with passing the routes mapper to plugins to add their own paths.  Which means that adding new admin pages, new user pages, or entire content management systems wouldn't require any changes to the core code.

SQLAlchemy is taking a while to get used to.  I like the declarative ActiveMapper style, but it too silently swallowed some errors that cause relationships between tables/objects to be lost.  But, I'm warming to it.

TurboGears, despite all these replacements, continues to function and be useful - the automatic application of templates, the automatic validation of forms, and automatic error handling is a potent combination.  That it doesn't tie you into a particular templating engine or modeling system is comforting, but the opinionated defaults are welcome too.  And the TurboGears widget system continues to impress me.

Still much for me to do - automatic excerpt generation, theme support, plugin architecture, anti-spam support, and so forth.  And tagging, so that I don't have to edit the database to show entries to those subscribed to particular topic feeds.  But it's probably the most enjoyable programming I've done in years - simple specification, tools of my own choosing, and no deadlines makes a great change...

7 old-style comments

  1. Robert BrewerOctober 07, 2006 at 10:12 PM.

    Sounds like fun. :) I'd be really interested in your Routes code, to see how it compares to the Routes dispatcher I just wrote for CP 3: http://www.cherrypy.org/browser/trunk/cherrypy/_cpdispatch.py#L205
  2. Robert BrewerOctober 07, 2006 at 10:12 PM.

    Sounds like fun. :) I'd be really interested in your Routes code, to see how it compares to the Routes dispatcher I just wrote for CP 3: http://www.cherrypy.org/browser/trunk/cherrypy/_cpdispatch.py#L205
  3. Robert BrewerOctober 07, 2006 at 10:14 PM.

    Oh, and your comment system returns a redirect to 127.0.0.1, which caused me to try posting twice. :/
  4. Neil Blakey-MilnerOctober 07, 2006 at 11:46 PM.

    Oh, fun.  Another missing tg.url or routes.url_for... 

  5. Neil Blakey-MilnerOctober 07, 2006 at 11:53 PM.

    Okay, fixed.  For some reason my routes redirect configuration is broken for the standard TG deploy using proxying, but using tg.redirect(routes.url_for(...)) works.
  6. Neil Blakey-MilnerOctober 08, 2006 at 12:11 AM.

    Ah, my base_url_filter directive was removed when I copied a configuration file from my development environment.

    Phew! 

  7. Neil Blakey-MilnerOctober 08, 2006 at 10:52 AM.

    Also just trivially integrated TurboMail to get email notifications of comments (and now to test if it actually worked without breaking everything)
blog comments powered by Disqus