Reddit had a link today to a blog entry called Why Django kicks Ruby on Rail’s collective ass in which the author mentions his reasons for prefering Django. As someone who’s using Django at work this week (and hopefully in the next), I would like to comment on his points.
Python
The author prefers Python over Ruby. I like them both, I couldn’t say which I prefer, although I would lean towards Python these days. Then there’s some stupid talk about how if Adrian a Jacob died that the continued development of Django would easier than if DHH died. His rationale is that there are more Python programmers, but it doesn’t take 10,000 code monkeys, just a few qualified developers and both groups have that, so that point is pretty moot.
Documentation
I don’t agree that Django’s documentation kicks RoR’s ass. The “prose” documentation on their official website is good, however I would really, really like documentation like Ruby’s API documentation. The author calls it “massively confusing”; it might be for beginning programmers or non-programmers (like designers), but as a developer I would really like that kind of documentation for Django. I can get a somewhat equivalent by using the python interpreter’s dir() and help() functions, however the navigation between different elements is hard. Sometimes I really want to know all the methods and attributes available for a class or what keyword parameters I can give to a method, and Django’s current documentation doesn’t cover that.
Templating
I like Django’s templating, because since it’s limited, you can’t begin mixing code that should be in the template and code that should be in the view. This helps keep things where they belong. As mentionned, the templates are also friendlier to non-programmer.
Speed
Python is faster than Ruby. Not much else to say here. Django has also proven faster than Rails.
Free, JustWorks Admin interface
I must admit that this is probably the best feature of Django. Sometimes, I wonder why I am bothering to create my own CRUD views when this is available (I am writing my own because I want to learn about more than just the admin interface if you must know.) I really like the idea of quickly whipping out a model, giving access to the admin interface to a content producer so that he can immediatly begin inputting data, before the views are complete.
Generic views and feeds
Those are fun too. In the app I’m writing, I use object_list and object_detail. They’re pretty fun to use. I have yet to create an RSS feed, but that’ll come.
Better support and server
As far as I know, Django doesn’t yet support MS SQL as the author claims. Support for MS SQL and Oracle is upcoming however, but in the mean time, I think that Rails has more database support. Whether it’s a hack or not, I don’t know. For web servers, I pretty much agree that mod_python > FastCGI.
Django is (mostly) buzzword free
It’s true that you don’t hear nearly as much hype about Django as with Rails, and as DHH once said about Rails (before it hit REALLY big), it’s a good thing to have a smaller community, because you don’t necessarily end up with mediocre developpers polluting the community. This happened to Perl with CGI.pm and to PHP.
4 Responses to “Django vs Rails”
Leave a Reply
You must be logged in to post a comment.
July 25th, 2008 at 9:47 pm
Rails is ok…except the speed. That’s the biggest [only?] real difference, at least for me.
August 3rd, 2008 at 6:58 am
Thank you
August 5th, 2008 at 4:46 am
good stuff
August 29th, 2008 at 3:35 am
This seems familiar… Where have I seen this article before? Could it be there: http://gnuvince.wordpress.com/2006/12/06/django-vs-rails/