devork

E pur si muove

Python web frameworks

Tuesday, August 22, 2006

It appears discussing web frameworks is popular currently. It also appears GvR has decided he likes Django and hopes it will become sort of the default.

I've been looking at this Django and TurboGears things for a while unable to decide if I should move the website that I appear to be maintaining (which was originally written in PHP and is rather unmaintainable by now) to one of them. I'm not going to add my own comparison here, but I remember from last time I looked at them they both had points I liked and I disliked and I was left undecided. Point is this "blessing" of Django doesn't help me at all. Firstly it's only the personal decision of one person, it doesn't help that that person doesn't like XML so effectively didn't really consider TurboGears.

Today however I had the idea to see if any of the two had any pre-build packages that one can use, like PHP has for forums, photo galleries etc.[1]

I couldn't find a link on the TurboGears website, but using Google I immediately ended up at a part of turbogears.org that was exactly this: a collection of useful applications/widgets. It's called cogbin. I'm not quite sure how it got hidden so well on their site, maybe because there aren't too many available yet. But it's important to note that they integrated it with the Python Cheese Shop by using the trove classifiers. I can't explain how good I find that.

For Django I found nothing of like this. Not on their site and not using Google. Did I just miss it or are they just not as organised?

So maybe I'm tending towards TurboGears for the moment. Their approach also seems more modular which seems to fit more in with the UNIX philosophy in my oppinion. They're even talking about things like markup, SQLAlchemy and Routes. All very exciting things IMHO.

[1] Now we're at it it's maybe also a good time to define interfaces to interact between components like this. I'm thinking mainly about user authentication and creation (but I'm sure there is more). That's a different story though.

Tuesday, August 22, 2006 | Labels: |

3 comments:

Karl said...

SqlAlchemy support in TG is pretty good as long as you don't want to use Catwalk/ModelDesigner. If you're not afraid of there being less than zero documentation. I've been using it on intranet projects for several months and I'm very pleased with it. I don't use activemapper, the joins aren't as powerful and I find that the names hinder more than they help.

Markup works for pretty much everything except defining widget markup (and that's being actively worked on). I expect Markup to become a full second class member (to use Kevin's description of SA) of TG in the next few days, as several of the committers prefer it over Kid.

I haven't heard much about Routes. I group it with CherryPy 3, something that's definitely in the future and will be cool when it gets here. BTW, Robert has mentioned on the TG list that CP3 is considerably faster than CP2, in at least one benchmark it's twice as fast.

Django is definitely better than it was 6 months ago. They've finally done a post magic-removal release and post magic-removal is much cleaner than the older stuff. It's biggest weakness is still the comparatively wimpy ORM (compared to SA) but if that's not an issue, I've enjoyed using it to produce content-driven sites. The admin really is killer for that sort of job.

Anonymous said...

Clearly, Guido wants one compelling Python-based web framework, and feels the need to nudge the process along. Why? Ruby on Rails, of course. I'm sure everyone knows that the Rails publicity has got people flocking to Ruby, whether they're doing web development or not. People assume Rails is so fantastic because of Ruby, so Ruby the language must be a better choice than Python. Sitting on the sidelines and watching that happen must be excruciating for Guido. This is a small, indirect effort to protect Python.

New comments are not allowed.

Subscribe to: Post Comments (Atom)