September 27, 2005

Django, Ruby on Rails, Cherrypy

I am working on a new website and had to check out the new frameworks that are available.

Ruby on Rails seems to have caused a lot of buzz. I also looked at Django SubwayCherrypy and myghty.
TurboGears

Here is my rational and how I decided on the tools for this project.

1) I like Python more than ruby. Ruby feels too much like perl for me.
2) I like a lot of abstraction - particularly around the database layer and form validation - both of which can take a lot of code, however too much abstraction makes it hard when something goes wrong. Or for example in the case of Plone - trying to do something the framework wasn’t designed for gets hard (connecting to a relational database). Too much abstraction in the presentation layer also isn’t good dotnet winforms and lotus domino come to mind. You want to be able to finely tweak the interface to make it look and feel good.
This makes me want to steer clear of Django and RoR
3) Myghty has only one developer and is fairly new which makes me anxious. Great documentation and lots of good examples.
4) Subway looks promising but is beta
6) Turbogears looks good but is very new (lacking documentation) and uses the kid templating system which I don’t really like - I prefer templating languages that don't look like xml - more like a programming language. It also uses the same underlying tools that I use.

Anyway I decided to use Cherrypy, SQLObject and FormEncode and Cheetah for template development.

The Good:
Python
SQLObject is very cool, speeds development and abstracts the database layer sufficiently
SQLObject deals with the pooling of database connections
FormEncode cuts your form validation code significantly
Cherrypy code probably could be ported easily to mod_python because the function parameter passing is similar

The Bad:
Cherrypy 2.1 documentation is scarce
FormEncode documentation is scarce
Not 100% in love with Cheetah template language (prefer myghty). But it gets the job done.

Although here is a great presentation that can get you started

Php became popular because it made data connectivity easy, there were tons of examples around, lots of documentation for new web developers, and it was easy to make a site look really good. These python frameworks need to focus on really good looking examples and documentation and then they may take off.

The only downside of the python community is that I find it a bit too academic. The developers are really smart and so are more interested in designing new frameworks then in getting the job done or making documentation for not so smart developers. That’s why we have a plethora of templating languages and web frameworks.

Posted by Anthony at September 27, 2005 10:03 AM