Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] ruby and python in Japan



On Sun, Feb 25, 2007 at 08:02:00PM +0900, Micheal Cooper wrote:
> I have been using PHP and looking at more OOP scripting languages. I
> decided a while back that python was for me, and Django looks really
> good, but I have heard really good things about Ruby and Rails.

Django is, no more or less, the Python community's answer to Ruby on
Rails.

Actually, however, Django isn't bad.  Its biggest flaws come from the
restrictiveness of the way that Python does things rather than from any
big problems in Django itself.  It also has some good ideas that I wish
the Rails guys would steal (like the concept of self-contained
applications).

Since Rails became popular, it seems that every scripting language has
been scrambling to come up with its own equivalent.  For instance, the
Perl guys came up with Catalyst, which to me is a doesn't-really-under-
stand-how-it-works cargo-cult clone.  Where Catalyst seems to attempt to
slavishly duplicate the superficial things that makes Rails work--like
the code generation things--Django tries to make the framework work as
if it were a Python framework, rather than a dogtrot translation of a
Ruby framework into another language.  I quite like how it takes
advantages of the good parts of Python rather than trying to pretend
that it's Ruby, like other Rails-clone frameworks seem to do.  Maybe
it's because Python isn't really that far away from Ruby (although
treating Python as if it were Ruby takes a bit of work--for instance,
you can't casually reopen a previously-defined class and change it like
you can with Ruby).

Judging by my investigations so far, Django is a solid piece of
software.  It's certainly a worthy competitor for Rails, once you take
the Python- ness as compared to the Ruby-ness into account.  I can't see
myself replacing all my Rails apps with Django apps, but if someone were
to develop a new app in Django, I wouldn't be crying "but there's a
better alternative you could be using!" instead.

If you know Python, then probably Django is a good framework for you to
be using for developing your web apps.  If you don't, then I would
generally suggest using Rails.  However, Django's biggest obstacles to
usability and developability seem to stem mainly from Python itself
rather than from Django.  Hence my "if you know Python" qualification.
An experienced Python guy would find Django a joy to work with (and,
indeed, said Python guy would probably find Rails far too "magical" to
be comfortable with).

If you're a Rails hand, but not necessarily a Ruby hand, then I'd say
that Django is well worth a look whether you end up implementing
anything with it or not.  There are some good ideas there.

At some point, I might make a table comparing Django to Rails.  There
are areas in which Rails is noticeably better than Django, and there are
areas in which Django is noticeably better than Rails, and there are
also areas in which they merely do things differently and it doesn't
make any odds either way which one you choose.

Professionally, I'm the supervisor of a team of Rails programmers,
working on a Rails application originally developed singlehandedly by
me.  On my team there is one guy whose job is essentially to look at
Django and see how well it could be used (or what good ideas it has that
are worth stealing).  I have a feeling that, merely because of our
existing momentum with Rails, we'll continue using that, but when
there's worthy competition it's certainly worth taking a look at.

--Dave


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links