markpasc (markpasc) wrote,

  • Music:

TurboGears vs me

I started working on Waveshark on the train during the commute home about a month ago. Because I miss Python, and I already tried to make a project with Django with mixed success, I decided I would try to do it in TurboGears. There were a few problems with that.

The first hurdle was that I was doing it on the train, meaning no internet connectivity. Even after downloading the downloadable version of the TurboGears manual, there were still big parts missing. I ended up downloading the Mochikit manual too, which certainly helped when I was writing to Mochikit, but I still haven't gotten the manuals for the other parts (CherryPy and sqlobject). I would have been fine if the TurboGears site had said up front I needed all those docs, but it didn't, that I could tell.

That's just a procedural problem, really. The first actual problem I had was with the authentication system. I didn't want to implement the login form just yet, but I needed a user context, so I wanted to make all requests automatically occur as a certain user. Seems like there's a weird session model going on maybe—you can have a session with no user, which is not familiar—but beyond that, I couldn't figure how to say in app-space, “The current user is x.” It wasn't documented. Is authentication part of CherryPy, so it should be in the CherryPy docs (which I didn't have)? TG provides the sqlobject-based authentication modules, so shouldn't they be documented in TG's docs? I ended up having to RTFS, which eventually answered my question, but meant I didn't get anything done in that hour chunk of work.

Beyond that, there's the lurking spectre of worry that my TurboGears app won't scale. How much can I do with CherryPy before needing a harder backend? Would I upgrade to Apache/mod_python then? When I bottleneck the database, will sqlobject let me memcache and partition?

At this point I've half given up working on it. I found another, more manageable project (which happens to be in Perl) to hack on first. I think of frameworks as their own mini languages, so over the weekend watching a bunch of Ze Frank reruns, the episode on procrastination hit home:

After a while, you may find yourself doing things that are even more involved than the thing that you're trying to avoid. That's OK! You might learn a whole new programming language to put off making something useful with the one you already know. You might experience a whole career to put off building meaningful relationships and finding an inner sense of self-worth. That's OK!

Maybe I'll start over with Catalyst and D::OD and Dojo (since Mochikit is dying, I guess?). Then I could get some work done.

Tags: code, perl, python, waveshark
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened