Ian Bicking: the old part of his blog

Reddit etc.

So Reddit has moved to Python from Common Lisp, and to a previously unknown (still unreleased) framework webpy (but also with the well-known SQLObject and Cheetah), causing some minor controversy.

One thing that comes up often in these discussions is a dismissiveness towards something you feel you can reimplement yourself. This actually appears in a whole set of cases here -- reddit reimplementing their site, webpy implementing another framework, the Lispers impression that they could reimplement any Python library if it was so important (or that they could just reimplement reddit entirely), and so forth. Sometimes reimplementation works; but often you don't realize the true scope of what is implemented so far, or you ignore the opportunity cost (you are coding to produce no advances, instead moving forward), or you ignore the fact that the thing you are reimplementing may itself be advancing even as you reimplement it. I don't have any new thoughts on this, really, but it's interesting to see so many kinds of reimplementation in the same discussion.

Anyway, Aaron Swartz talks about the switch as well, and about why he chose (or stuck with) webpy instead of Django. One thing he doesn't explicitly say, which I think is an important criteria, is that Django's best features (its CMS-ish features) probably have no relevance to either reddit or Aaron's project. So Django's features are just baggage in that context. In particular, they are both working on just one application; they don't need to push out lots of apps, they probably aren't working with many (any?) designers, and they want to optimize some very specific aspects of their application that they consider the competitive parts.

Another aspect is that they probably don't mind a little legwork to implement each form, if it means they can tweak that form arbitrarily. Since I believe exceptional UI is only possible if you diverge from the rules, I'd agree with them. Good UI doesn't necessarily require that, and when you are looking for quantity instead of quality, a framework can be very useful. Better the rule-driven good form a framework gives, then the crappy form you write yourself which you don't have time to improve.

Another thing that complicates Django -- and many other frameworks -- is configuration. When Aaron mentions that you have to use their console and environment, it's because of configuration. I personally haven't figured out the right way to do configuration. I suspect the webpy answer to that is to hardcode many things, or use ad hoc techniques to identify your environment. That works when you are maintaining one app in a small number of environments. But even if it isn't important for them, configuration is important for most people; if all webpy does is avoid the issue I think they've oversimplified the system.

Aaron also says that he doesn't think there's any framework that matches the simplicity of webpy. Well, I'll bite and offer up Wareweb. Since I've finally gotten a chance to use it some more, though only on small apps, I'm feeling a little more confident about it. I still might remove some parts and add some parts -- I've been thinking about REST-like dispatching (but definitely not as strict as webpy seems to be), and I think the generalized event system in Wareweb isn't really necessary. The URL dispatching webpy uses could be applied easily enough. But enough apologies, those suck. Wareweb is:

So if you find yourself looking for a simple web framework, I would definitely suggest looking at Wareweb.

Created 07 Dec '05

Comments:

ha! Someone else who types "pythno" instead of "python". The Wareweb link needs editing. :)

# sil

> Well, I'll bite and offer up Wareweb.

So followed this link ... the page it leads to offers no help whatsoever in understanding how Wareweb works. It rather scares me away with seemingly overcomplicated statements on how Wareweb is different from Webware.

All I need is a simple example to give me some level of understanding of how it works.

# Anon

I suppose the page doesn't really say how to start, though if you are familiar with servlets (which themselves aren't particularly complicated) then it should seem somewhat familiar. OTOH, I am not saying that you should use this instead of a full-stack system, and I'm not offering it up as an alternative to Django, and if you need guidance in application design this probably isn't the framework for you. Wareweb is a simple and predictable core, but it's only part of a full stack.

I could point you to the Commentary application I wrote, but I'm not sure it's going to help. And the Filebrowser app also uses it, but similarly it is a little funny and minimal (though at least it uses templates, where the Commentary application is so light on HTML that I opted not to use templates).

# Ian Bicking