Everybody know Ruby on Rails right now. There is a lot of post all over the web, showing us the new latest new web programming style. This is a little funny because in a past life (4 years ago), I worked on something quite similar for Zope, name ZModeling. And I guess a lot of people has done the same, by generating the html from a data model (It tooks me about 1hours to do that for my latest website). That’s it and this is the latest hype stuff. IT loves hype !
Anyway, as this become usual, (grrr) there is a bunch of projects that try to clone the rails features. The well know python proverb can be used:
Divide to loose
Here ‘s a little list:
Django is the total new one, it’s written from scratch, and doesn’t re-use anything.
- it use mod_python for apache integration (no SCGI for lighttpd ??)
- custom ORM
- custom template engine (why not another one !!)
This one has a lot of good comments, and a lot of people see in this stuff a Zope killer app.. or something like that but ..
Subway was born just after Ruby on rails, and is the direct competitor.
- CherryPy: stable, simple and robust HTTP framework
- SQLObject: the world famous ORM for Py
- Cheetah: a plain old fashion template engine.
This is nothing more a app skelton generator, with a little wraps around the whole stuffs, nothing magic, but simple .. perhaps too simple ?
TurboGears is a the latest one I think
- CherryPy
- SQLObject ORM
- Kid template: a simple ZPT like
- A powerfull Ajax toolkit.
The API is a bit Frankhein right now I think (I don’t like the raise CherryPy in the middle), and the templating is not powefull enought. But it’s really interesting (meanly the Ajax API).
Paste is something a bit different of rails, It has a more large framework
- WSGI
- SQLObject ORM
- ZPT: The powerfull Zope Page Templates
Perhaps none right now:
- Django use (for me) too much indoor product, I think there is a lot goods frameworks for python right now, and re-writting a ORM expose the project to a some strange bugs, or missing features, or wrong design (the meta api is freak) . same for template engine.
- Subway and TurboGears are really quite the same product, and they are lacking of some features like the admin page for objects. I prefer TurboGears meanly for the Ajax toolkit.
- Paste, is as usual a very well written stuff from Ian. The API is clear, and tools are well known. But I think the framework take too much place. I mean force you too use it’s configuration stuff, and other WSGI server.
So perhaps, you can pick just one of this, as they’re all looking close:
- If you want to discover something really different: Django
- If you want something closer to rails: TurboGears
- If you like the servlet and threads choose: Paste ..
But take care that the framework you choose feet with:
- your way of web programming (servlet vs controller + template)
- the project load (I mean mod_python is awfull to debug but provide some very good performance)
Anyways, the choice is really hard because it’s time to choose right now, and I believe that some frameworks will die sooner than others.. Django seems to be the next big python project, but some people share my opinion about :” I don’t want to learn another ORM !”
But, beside there is a lot of frameworks, they ‘re loosing the main goal: Using a good framework is a good stuff. But using good products is better. They all miss the component model. HTTP + ORM + Template engine = Web Framework, but for a application framework you need a little more. Some stuffs have been done on Webware, and Quixote about this, but it looks like people designing framework never look at the past, and keep on going building the same stuff over and over.
What we need now, is a application framework. Something we can use to build website not webapp. Clients are now asking for : “I need something to post articles + a forum + a wiki + ..” That’s too much for a quick answer like: “Ok I gonna use this web frameworks”. On the PHP scene right now, you have some great products that tend to share some component, like user rights, templating .. and this is really a bad news for Python users, because the only stuff we have to fight against this is Zope. And it’s getting even worst since right now, most products need Plone and all the bloat it’s about.