Web Framework Wars : Django vs Ruby on Rails

A Brief Introduction

Django and Ruby on Rails are both excellent web frameworks. They are the source of power for many of the powerful websites like Github, Soundcloud, Bitbucket etc. .

Django, based on python , came out in July 2005. It is a powerful framework  following Model View Template architecture, powering websites like Bitbucket, Instagram, Pinterest, NASA etc.

Ruby on Rails, based on Ruby, came out in  February 2005. It follows Model View Controller architecture. It is being used in many of the top websites like Github, Soundcloud, Hulu, etc.

I will be comparing Django and Ruby on Rails based on following criterias:
  • Market Share
  • Job Trends
  • Technical Aspects
  • Available Documentation and Tutorials
  • Popular Websites based on these frameworks


#1 Market Share and Trends

Owing to its quick mutation and initial startups based on it e.g. Twitter, Rails attracted a large share of web developers.
Django on the other hand, despite of its power, wasn't quick enough to evolve and thus lagged far behind Rails.
According to Google Trends data:

Google Trends: Django vs Ruby on Rails
Google Trends: Django vs Ruby on Rails

In terms of numbers of websites, Ruby on Rails towers over Django. According to similartech.com, as of August 2016, Rails powers over 1.8 million websites whereas Django is used in a little over 93k websites.

Number of Websites: Django vs Ruby on Rails
Number of Websites: Django vs Ruby on Rails

Inspecting further, here is a comparison of categories of websites where these frameworks are being used:
Website Categories: Django vs Ruby on Rails
Website Categories: Django vs Ruby on Rails
Verdict: Ruby on Rails is the clear winner considering market share and trends among web developers. 
Though Django is equally powerful and efficient, and is coming into trends lately, it still has a lot of catching up to do.


#2 Job Demands

Since Ruby on Rails dominates the market share of websites, it also dominates the job share in web development sector.
There is a huge demand of Ruby on Rails developers as compared to Django developers.

According to indeed.com:
Job Trends: Django vs Ruby on Rails
Job Trends: Django vs Ruby on Rails
Since Django is catching up with Rails and increasing its share in the number of websites. So,the demand for Django developers is very likely to increase.

Verdict: Ruby on rails edges past Django in terms of Job demands too. But the growth of Django in web market share is likely to increase demands for its developers.



#3 Technical Aspects

Architecture and Design Principles

One of the main differences between Django and Ruby on Rails is that Django uses MTV architecture while Rails uses the MVC architecture.

MVC stands for Model View Controller. 
Model represents the data in the system/server(usually Database), View defines the presentation of data and Controller is the intelligence and interface between the model and the view.
Ruby on Rails: MVC Architecture

Ruby on Rails:
MVC Architecture


MTV stands for Model Template View.
Here Model defines the data, Template defines how the data will be presented and View acts as the interface between Model, Template and the User.


Django: MVT Architecture

Django:
MVT Architecture



Ruby on Rails follows the Convention-over-Configuration principle. CoC means no config files, predefined directory structures and using naming conventions.
It features magical auto imports, auto template naming as well automatic passing of view instances to controllers.
These features of Ruby helps developers write a cleaner and shorter code.
Due to these magical features and shorter codes, the Rails code might be a little tough to debug sometimes.


Django follows Explicit is better than Implicit principle, a core pythonic principle. According to Django's documentation:
Explicit is better than implicit means Django shouldn’t do too much “magic.” Magic shouldn’t happen unless there’s a really good reason for it. Magic is worth using only if it creates a huge convenience unattainable in other ways, and it isn’t implemented in a way that confuses developers who are trying to learn how to use the feature.

Basically a Django project is a collection of many apps. Each app has its own Model, View and Template set, and is responsible for a subfeature of the project.
Django supports more direct way of coding, defining both conventional and unconventional aspects. Django code is more readable and hence is easier to debug.


Native Language

Django has Python as its parent language, which is extremely powerful and scalable. Python has tons of modules which can be used in a Django app. It has a diverse community with close ties to Linux. Python is used by companies like Google, Mozilla, National Geographic,etc.
Apart from Django, Python has a number of other web frameworks like Flask, Bottle, Falcon, etc.

Ruby on Rails, on the other hand is based on Ruby. Ruby is also a very powerful language with a large number of modules. Ruby uses a magical approach to programming as compared to python which uses a more direct approach. Ruby on Rails is credited as "making Ruby popular".
Ruby is used by Apple, Twitter, Github, etc.
Ruby also has a number of web frameworks like Cuba, Lotus, Padrino, Sinatra, etc.


Verdict: Django and Rails are both equally powerful and efficient. Django is powered by Python , used widely in academia and Linux. So it comes with a large variation of modules and libraries.
While Ruby, which powers Rails is more web focussed, making it more suitable for web app developments


#4 Documentation and Available Tutorials

Both Django and Ruby on Rails has excellent documentations.

Rails Documentation - http://guides.rubyonrails.org
Django Documentation - https://docs.djangoproject.com

Both documentations are suitable for novice web developers with a little background in programming.

Apart from thee official documentations tons of excellent tutorials are available on the Internet.
Few of them are-

Django -
Ruby on Rails -

Verdict: Official Documentations of both frameworks are excellent and suitable for novice as well as pros. Ruby edges past Django in terms of unofficial tutorials on the web.


#5 Popular Website on these frameworks                     


So what is your choice ? 

Web Framework Wars : Django vs Ruby on Rails Web Framework Wars : Django vs Ruby on Rails Reviewed by Unknown on 2:17 PM Rating: 5

15 comments:

  1. First of all congratulations on writing your first blog.It is a good research work done on the topic.It would be great to know your views on object oriented programming.

    ReplyDelete
    Replies
    1. Thank you Shardul.
      Will surely write about object oriented programming. Stay tuned

      Delete
  2. An awesome blog....and an mind bogling comparision between the 2 frameworks and it discloses all the facts from which i was not aware....and it will be a great help for the begginers and geeks....Thank You so much for this...

    ReplyDelete
    Replies
    1. You don't need such blogs. You are far superior to us;the mortal ones.

      Delete
  3. awesome post presented by you..your writing style is fabulous and keep update with your blogs Ruby on Rails Online Training

    ReplyDelete
  4. After reading this blog i very strong in this topics and this blog really helpful to all.Ruby on Rails Online Training Hyderabad

    ReplyDelete
  5. I like your blog, I read this blog please update more content on hacking, further check it once at python online training

    ReplyDelete
  6. I am extremely greatfull to you as you shared this.I am recently developing associate app spotify premium apk zippy that is you would possibly have an interest to appear thereon

    ReplyDelete
  7. Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and time
    ruby on rails training
    ruby on rails training

    ReplyDelete

Find us on Facebook

Powered by Blogger.