Python Notes

Friday, January 21, 2005

What's the fuss about Rails?

Ruby on Rails is making a lot of noice these days. I first heard about it on comp.lang.python, where it was mentioned a few times. Later, I noticed how many people wanted to write an application on Rails. And this weekend, it has made it to Slashdot home page. That's attention. Rails is already Ruby's killer application.

Rails has appeared in a very interesting moment. First it was Perl, and then PHP. Both languages were for some time considered the standard way to write a web app (that, despite Paul Graham's success using Lisp, but that's another history, and he's Paul Graham anyway). But neither solution does scale well. Perl's limitations became obvious first. Now it's PHP turn, as people try to use it for more complex applications and start to hit its limitations. It seems that the spot for the best way to write a web app is now free, and Rails is aiming for it.

But despite all the noise, I had a hard time understanding what was it about. Don't get me wrong; Ruby is a good language, and Rails is a well structured framework. However, what can Ruby do that can't be done with a suitable selection of Python modules? Each of the components of Rails has equivalents in the Python camp, that more or less match or even surpass its capabilities.

The answer is simple: convenience. Rails is a one stop shop. People just love that. It makes it easy to install, and avoids the burden of having to choose between the numerous possible combinations of ORMs, templating modules and web frameworks. Rails also offer architectural integrity: all modules are well integrated, and have been built from the scratch to be used together. Few developers ever realize how important this convenience is.

That got me thinking. What does it take to compose a similar package for Python? I believe that someone has to build a distribution, so to speak, using some of the above mentioned components. That would alleviate some of the more obvious problems with selecting, downloading and installing a handful of tools from a universe of hundreds (literally). The documentation needs to be integrated as well. A single web site would become the hub of activity around which a community could gather. It would build momentum. It could become the new killer application for Python.

The good news is that people are aware of the problem, and working on it. A new project, named Subway, aims to implement something similar to Rail. The project's goals are fairly aligned with the vision presented above. For now, the work seems to be on replicating Rail's CRUD model. The project uses CherryPy, SQLObject, and Cheetah to provide other parts of the functionality. Will it work? I still don't know; I agree with some of the choices, but I think that other parts of the system (particularly the templating) deserve something simpler and more pythonic. But it's being done, and that's what counts now.

14 Comments:

Post a Comment

<< Home