Battle of the Backends: Analysing NodeJS, Ruby on Rails and Django

Who wins the battle?

Mansi Parashar
TheLeanProgrammer
4 min readApr 6, 2021

--

Stuck in the suspended bubble of wanting to be productive but not knowing where to invest your resources and efforts? A dilemma that plagues many a developer is that of deciding which framework and skill set would be most useful in the current market.

Although there is no clear-cut answer for the same, what can be presented is a comprehensive view of the strengths, limitations, and applicability of these frameworks, making it easier to choose the one which fits just right.

So what exactly is a Server-side web framework?

They provide tools and libraries that simplify common web development tasks:-
● Routing URLs to appropriate handlers
● Interaction with databases
● Create and manage sessions
● User Authorization
● Formatting output (e.g. HTML, JSON, XML)
● Improving security against web attacks.
The most extensively used web frameworks in today’s market are Ruby on Rails, NodeJs, and Django which have been adopted by many elite tech companies.

Rails VS NodeJS VS Django

1. Overview

1.1 Ruby on Rails

  • Language: Ruby
  • Architecture : model-view-controller (MVC) pattern- promotes modularity and extensibility
  • Adopted by: Github, Airbnb, Hulu, Heroku.

1.2 Django

  • Language: Python
  • Architecture: Model-View-Template
  • Adopted by: Instagram, Spotify, YouTube, bitbucket, Mozilla

1.3 NodeJS

  • Language: JavaScript
  • Architecture: Single-Threaded Event Loop
  • Used by: Netflix, PayPal, Uber, LinkedIn

NodeJS is not technically a “framework”, it is a JavaScript runtime environment that executes

JavaScript code outside a web browser. One can utilize a server framework such as ExpressJs or MeteorJs to implement the backend services.

To Summarize,

● Rails, Django, and Node.js are all free, open-source server-side web frameworks.

● All three adhere to the DRY (Don’t Repeat Yourself) principle.

Ruby on Rails provides a fast pace of development making it the favorite in Start-up Culture: It is great for industry standards development and prototyping at a rapid pace.

  • But, Rails cannot compete NodeJs’ performance and scalability — To highlight this fact,
  • LinkedIn made a shift from Ruby On Rails to NodeJs for enhanced performance and a more lightweight app. Although it is to be noted, this becomes an issue only when the user base rises drastically.
  • It is best suited for metaprogramming and database-backed modern web programming,

Django is best for developing complex and dynamic apps, especially those requiring advanced CDN and CRM content.

  • It allows for more customization and is good for CPU-intensive tasks.
  • It has a less steep learning curve and could be deemed a good choice for beginners.
  • Django is seen frequently in the academic world.

NodeJs is a great choice for real-time apps and platforms which require handling of a large number of multiple connections but fails when it comes to CPU-intensive tasks.

  • It is the ideal choice for an app requiring low latency and extensive I/O.

In the end, this is not a battle that has to be won. The choice of the framework depends on the type and scale of projects being developed and the functionalities the developer would wish to include. Evaluate where and which niche you see yourself working in the near future and that should make your path to the decision clearer.

Don’t forget to follow The Lean Programmer Publication for more such articles, and subscribe to our newsletter tinyletter.com/TheLeanProgrammer

--

--