ruby on rails ... python on ?

Ian Bicking ianb at colorstudy.com
Mon Nov 1 12:42:15 EST 2004


flab ba wrote:
> The pragmatic programmers (Dave & Andy) are spreading a good word about
> RubyOnRails. I was wondering if there are any Python programmers who are
> /also/ familiar with Rails - and if they could recommend something in the
> Python world that is comparable.

I've looked a little at Rails.  It's not super special.  Well, it *is* 
compared to things like Java; dynamic languages *are* quite superior for 
rapid development of websites, and Ruby and Python are similar languages 
in that way.

Rails is really a whole stack that works well together.  People have 
been writing this sort of thing in Python for a long time; which isn't 
to say they always have gotten it right, or that those efforts have had 
the right perspective to be strategic successes (i.e., become popular).

Lessee... Rails seems to have:

* A simple object publisher.  There's a ton of these in Python.  It also 
perhaps includes some sort of MVC system, where the object picks up a 
template automatically if it exists.  These exist as well, though I 
think MVC efforts can become overly ambitious or overly restrictive 
fairly easily.

* An object-relational mapper.  I'd say this is close to SQLObject, 
though SQLObject is in some ways more powerful.

* A templating system.  Looks like ASP.  There's lots of templating 
languages in Python; the simplest (e.g., embed Python code) can be 
problematic because of Python's significant whitespace.  But anyway, we 
have lots and lots of these, and there are real reasons for why there's 
multiple templating languages.  Spyce is probably the closest to Rails.


All three of these pieces fit together really well in Rails, which is 
perhaps what it offers that Python doesn't have.  Well, I'm sure some 
framework out there has this, but it's hard to say, there's so damn many.

But, while this is really compelling when you show off the creation of a 
simple system, I suspect it becomes a fair amount more complicated later 
on.  At least, that is my experience with Python projects of similar 
ambition.  It's neat to setup a database and have it work instantly, 
complete with the standard CRUD forms.  But this only works for "leaf" 
tables, and even then no so well.  How do you deal with joins?  How do 
you deal with complex requirements on input, or actions on updates? 
Eventually you'll need to tweak a generated form just a *little*, does 
that mean you have to throw away all the automated aspects and code it 
by hand?

I don't mean to criticize Rails with these questions; it's not that 
Python frameworks solve these wonderfully either, these are just hard 
problems.  But for realistic web applications these are inevitable 
issues, and I suspect Rails isn't quite as compelling when you take them 
into account.

OTOH, I'd love to see something in Python that is just as tight as 
Rails, but uses all the pieces we've already developed.  It's really 
just a question of sticking pieces together; but that's a surprisingly 
difficult operation.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org



More information about the Python-list mailing list