Ruby on Rails and Django are both open source web development frameworks which are intended for rapid web development. The origins of both web frameworks – Ruby on Rails and Django – are other applications. For Ruby on Rails it was Basecamp application developed by David Heinermeier Hansson and 37signals.com and for Django it was news-oriented site management tool, by The Word Company. More or less, Ruby on Rails and Django have been extracted and begun a new life as web development framework. Both are rather new and utilize latest web technologies of building web applications. So which one to choose?

First of all Ruby on Rails is more popular. One may ask, why popularity could be the reason that a web development tool like Ruby on Rails is the right choice? The answer is, Ruby on Rails being more popular means bigger community. Bigger community means often (and also in this particular case) bigger support in term of plugins and add ons released. Also Ruby on Rails, as a framework is more mature since it has been used and tested by more people than Django, which resulted in better feedback and therefore gave Rails some nice upgrades. Ruby on Rails community is also very helpful, just check railscasts.com and teachmetocode.com – all that knowledge available for free for anyone who wants to develop successful web application in Ruby on Rails.

Both Ruby and Rails and Django use HTML templates extensively. They major difference between two frameworks: Ruby on Rails and Django is that Rails allows you to use inline code whereas Django offers you only some tags. In result Ruby on Rails developer has more flexibility in developing web applications allowing more complex solutions. When it comes to scalling applications written in Django and Ruby on Rails, Django is a winner here. But only if we take into consideration Ruby on Rails 2.x and Ruby 1.8.x, because new Rails, version 3.x, based on Ruby 1.9.1 is as fast as Django and Python in most cases. Also, scalling is the case for big, applications like yahoo and facebook. Mostly, you’ll use Ruby on Rails and Django for small to medium business to business web applications, so scalling application for million hits traffic and 10000 servers won’t be the case for you.

Along the same theme of presentation layer, Rails and Django use different approach to JavaScript and AJAX in their views. Ruby on Rails web application development framework has build in support for Javascript (using Prototype and Scriptaculous). For Ruby on Rails developers who prefer other solutions like JQuery, there are great drop in replacement plugin for Ruby on Rails which give the same functionality as standard built in methods that handle all the work with AJAX requests, making the Ruby on Rails programming joyful. Django on the other hand ships only with a JSON module, leaving any and all JavaScript decisions and development and unfortunately problems to the developer.

Ruby on Rails and Django both use object relational mapping to connect underlying database to business logic of the application (Models). The main difference is how Ruby on Rails and Django define objects. Ruby on Rails does not use class definition declaration. Instead Ruby on Rails retrieves all needed information from the database basing on Ruby on Rails naming convention. So if you follow Ruby on Rails conventions you may take advantage of Rails mayor philosophy: “Convention over Configuration”. Of course Ruby on Rails user may choose to configure mapping by hand. Django user do not have it all that easy and smooth, because Django user are required to explicitly specify each attribute of every single class!

Both frameworks, Django and Ruby on Rails differ in approach for admin pages. Django has built in system for automatically generating admin pages for model objects with ways to customize the presentation. Ruby on Rails philosophy is better. Instead of packaging the framework with all possible feature, Ruby on Rails development team tends to extract various features into plugin and add ons, leaving the decision, what is needed for particular Ruby on Rails application to developer. As I mentioned before, Ruby on Rails framework community has published many solutions in a form of plugin so you have a lot of choice – you may use something which once belonged to the Ruby on Rails core, as well as one of the many 3rd party solutions. Django and Ruby on Rails both use URL mapping.

Long story short – Ruby on Rails Convention over Configuration philosophy prevails again, because if Ruby on Rails developer follows basic conventions for Rails then everything is being done for him automatically. Of course Ruby on Rails offer its users ways to customize URL mappings. To sum all this up: whatever you choose as your development platform, you won’t be bad with your choice. But obviously, picking Ruby on Rails will make you shine.