I'm vaguely yearning for a simpler framework than Django

August 28, 2013

I was going to say that this entry was about my disenchantment with Django but that isn't really accurate. Django works fine for what it is (although there are rough edges), it's just that it has a bunch of complexity and a certain amount of magic and (more importantly) it feels like a vast overkill for what I periodically want to do. The drawback of batteries being included is that they weight a lot.

(In a metaphorical sense. I'm not worried about Django's resource usage.)

In a way, the problem is that there is both too little and too much for a simpler framework to do. To really take a burden off the developer, you need:

  • templating.
  • form display, validation, and redisplay (including things like protections against CSRF).
  • URL routing.
  • some sort of database mapping layer.
  • some way to use database models outside of the web application itself, to enable cron jobs and commands and so on.
  • an optional layer to map database entries into forms and vice versa (which should be security smart).

(In a modern web framework you probably also want support for JSON service endpoints for frontend JavaScript or the like. Arguably that's like forms (and their database mappings), just without the complex HTML in the middle. Unfortunately I have very little idea what this should look like since I have quite little experience with frontend JavaScript.)

Given that this is most of what Django covers, I'm not sure that any framework (or set of framework components) that covers this is really going to be 'simple'. Especially unlikely to be simple is the bridge between database entries and forms, but it's also a very important component if you actually are working with a database.

(I've been thinking about this partly because my Django modularity design puzzle keeps rattling around in the back of my mind. It's quite possible that I won't need to use any of Django's powerful features in the eventual web app, which in theory means I could write it with a simpler framework instead of trying to fight how Django wants me to do everything.)

PS: pragmatically, I should go through eg Eevee's discussion of Python web development frameworks and read the documentation for the various frameworks to see how they cover these areas.

Written on 28 August 2013.
« An example GNU Readline quoting function
A new piece of my environment: clearing the X selection »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Aug 28 00:38:03 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.