

Rails and Django comparison whitepaper  - iamelgringo
http://www.vaporbase.com/rails-django

======
Goladus
There's some good information there if you're trying to choose a web
framework. I would just ignore the ratings.

------
hsiung
Haven't read the whole thing over, but they make no mention of performance
comparisons in the conclusion. How could you miss that!

~~~
wmf
Haven't you heard? Performance doesn't matter; it's all about scalability
these days. After all, what's the difference between 100 servers and 200
servers?

~~~
hsiung
Let me get this straight. So you would choose the framework with slightly
better plugin support and larger community even if it meant it was three times
slower and consumed twice as much memory? If you have deep pockets and have no
adversion to unnecessarily managing huge server farms, then go ahead.

I've presided over two rails websites in the past and topping out at around
15req/s on average was not fun. Rewriting to Django and getting 45req/s and
less memory usage was definitely worth it. (I'd rate my development experience
in other areas to be about equal)

~~~
reitzensteinm
Sarcasm meter broken this morning?

------
mrtron
Decent attempt at comparing them, but there are some spots they clearly don't
know enough about the frameworks to provide a valid rating.

Basically they are saying both are good, which is true.

------
jayded
Very biased article on Rails vs. Django that makes some good points -->
<http://jng.imagine27.com/articles/2007/07/12/red-vs-blue>

------
chaostheory
Overall I feel that the paper is good and accurate...

There is one thing that annoyed me though (having used both Python and Ruby
extensively):

"Ruby and Python are really quite similar. For example, Both are strong
object-oriented languages."

That is NOT True. OO was probably not part of Python's design from the start.
It feels really tacked on when you have to call 'self' everywhere, and try
doing inheritance past a parent (to grandparents and so on...); that's when it
becomes really obvious that OO was an afterthought in Python, though this may
change with Python 3000 (haven't seen it yet)

For the record I still feel that Python is a good language (for my C friends),
it's just not for me - or for most people i know that like OO

~~~
AF
The article is correct. In this interview (<http://twit.tv/floss11>) Guido
states that Python has been OO from the outset (1990).

The thing you have to understand is Ruby and Python do OO differently. To
Python everything is a hash table. This isn't the case for Ruby and their
differences mainly stem from that. It adds interesting elements like functions
are very simple to pass around in Python because they are not bound to a
class. It is still OO, just a different way of doing it.

Guido has also repeated for years that passing around self isn't a technical
necessity. He prefers it as part of Python's "explicit is better than implicit
policy. What you have to understand is that a method call boils down to
method(receiver, args...). Python just makes that explicit.

Another quote from Guido:

"Get rid of self: I think this has been addressed in the responses; it's not
as easy as you'd think, and there are important advantages to the uniform
interpretation of methods as "just functions that get called in a funky way".
In Ruby, everything is a method, or an anonymous block, and there are no "free
functions". Python uses the complimentary approach, treating functions as
first-class citizens. Both approaches are complete; they are however
incompatible, and you can't easily morph one into the other. (Personally, I
find that the criticm of explicit self has about as much merit as the
criticism of Python's use of whitespace.)"
(<http://www.artima.com/weblogs/viewpost.jsp?thread=214325>)

I too think it is kind of a silly argument. Passing around self has never been
a problem for me. 4 more letters for each method. Not a problem, imo, in
exchange for first-class functions. And super() in Python works fairly similar
to super in Ruby AFAIK.

For the record, Common Lisp users probably find both Python and Ruby's OO
limited and clunky. Just got to keep in mind there's different ways of
approaching it.

~~~
chaostheory
No it isn't. "Both are strong object-oriented languages": the key word (that
is wrong) is 'strong'. Based on my examples Python may implement OO better
than say Perl but it is NOT a strong implementation of OO compared to other
languages.

It's great to know how and why Python is the way it is, but at the end of the
day you can give a million reasons, but the kettle will still be black.

What you posted is like me explaining that (current) Ruby is not slow (which
is a joke), it just implements threading differently...

~~~
AF
You can directly compare the speed of an application or a language.

It is not subjective to say 'C is faster than Perl' or 'Perl is faster than
Ruby'. That is true, in almost every instance, C IS faster than the equivalent
Perl code and the equivalent Perl code is faster than Ruby (whether that holds
true for Ruby 1.9 we shall see).

On the other hand, what constitutes a 'strong' implementation of OO is purely
subjective. Would you consider Common Lisp's implementation of OO 'strong'? It
is completely different than how Ruby works. But it isn't any more or less OO,
it is a different way of doing it. Now if we really want to get into
subjectiveness, Smalltalkers would probably say that Ruby's OO is not 'strong'
because Ruby resorts to not making conditionals actual objects, unlike
Smalltalk, in which literally just about everything is an object.

You might even say that Python is more OO than Ruby because functions are
objects in Python but methods are not similar first-class constructs in Ruby
(note: I wouldn't actually argue this, but it is just an example of how the
languages do something differently).

~~~
chaostheory
I still feel your 1st post was weak, but you make good points in this post - u
win; i'm not keen on religious flame wars

------
icky
Being a thoughtful, rational type, I'll suspend judgment until I've read the
whitepaper. Then I'll vote on the article based on whether the conclusion
supports my preexisting biases... ;-)

