DEV Community

Cover image for Django vs Ruby on Rails: Web Frameworks Comparison

Django vs Ruby on Rails: Web Frameworks Comparison

Django Stars on October 04, 2019

There are more than 90 web development frameworks out there. No wonder it’s hard to choose the one that’ll suit your project best. Still, there are...
Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦 • Edited

I'm very sorry but this comparison of Pros and Cons is superficial and inaccurate of these two frameworks. Just to prove my point on one point listed above (with factual proof):

Ruby on Rails Documentation

Ruby on Rails has excellent documentation. This article purports that the quality of documentation varies so implicitly applies that Django has better documentation. This is not true. When comparing Ruby on Rails documentation with Django. RoR wins.

Compare the security pages documents. You will see Ruby on Rails dots the eyes on everything where you need to go digging with Django.

guides.rubyonrails.org/security.html
docs.djangoproject.com/en/2.2/topi...

The Rails API is thoroughly documented.
api.rubyonrails.org/

I can't even find the Django's API. So after searching for 5 mins I can't find an equivalent for Django that documents things. You could easily mistake this being the API Reference:

But all get is lock documentation on the components but not at the code level. You know why? Because Django does not document their API. You simply browse the codebase on GIthub to tell.

Look at Rails. They a very through describing how all their code works:

Browse as much as you may you will not find it in Django.

Collapse
 
davidmm1707 profile image
David MM👨🏻‍💻

I love Django, and most Django developers love the docs, but I dislike it.

It is well written, but the information is dispersed. Sometimes to do something, you need to look for information in 3 or 4 pages.

I would like to see something like Flutter, for example, on ListViews we have:

api.flutter.dev/flutter/widgets/Li...

The class, a lot of examples, to the right we have the constructors, properties, methods, etc.

Collapse
 
cadetstar profile image
Michael Madison • Edited

I also argue against the statement that Rails does not have a REST capability... the default routing for a given resource follows REST conventions, and in Rails 5, you can spin up a Rails app in API mode that slims down the gems installed (removing the templating and asset gems, e.g.), and optimizing the stack for restful API actions

Collapse
 
kwstannard profile image
Kelly Stannard • Edited

Maybe the author has never seen Rails used in the default way? I have seen apps that take make use of the defaults.

Collapse
 
gbudiman profile image
Gloria Budiman

This is true. Our company has 12 Rails microservices, all running in API-only configuration.

The author obviously has mediocre experience with Rails and writes articles based on hearsays.

Collapse
 
ohaddahan profile image
ohaddahan • Edited

As someone who works daily with both frameworks, and unlike you I don’t self identity myself as “framework stars” I can claim without bias that this article is wrong on many points, inaccurate, very biased and unprofessional.

Collapse
 
mdoyle13 profile image
Mike Doyle

Man, I am sick of these types of articles....

Collapse
 
kickbuttowski80 profile image
Izak T

amen to that .
no one talks about fundamentals any more.

Collapse
 
mdoyle13 profile image
Mike Doyle

right. i usreRoR daily. I've built things in Django in the past. Pick the right tool for the job based on other factors like your team's competencies, long term business plans etc. You can build the same thing in both frameworks. It does not matter.

Thread Thread
 
kickbuttowski80 profile image
Izak T

amen to that.🙏🙏🙏
I just decided to stick with ror and not jump from one language or teconogloy to another one. trust me tomorrow paython will be useless and something else will be better. I wanna focus on algorithm , design patterns and so on.

Collapse
 
juanmanuelramallo profile image
Juan Manuel Ramallo

Building an API with Ruby on Rails can be incredibly complex, as RoR has no equivalent to Django’s REST framework.

🙈

guides.rubyonrails.org/api_app.html

Collapse
 
teaglebuilt profile image
dillan teagle

I am personally not a fan of Ruby on Rails. I think Django is great. If you do like the Controller style, there is a python framework called Masonite that implements controllers like Ruby on Rails.

docs.masoniteproject.com/
github.com/MasoniteFramework/masonite

Collapse
 
exadra37 profile image
Paulo Renato

This is an excellent article about the pros and cons of using both frameworks. Kudos for it :)

Without wanting to diminish the above frameworks, I would like to call the attention for a new contender on the block, that is worth to also consider, the Phoenix framework that is built in the Elixir programming language, that runs on top of a battle tested ecosystem, with around 30 years of existence.

Ruby on Rails developers will fill more at home with Phoenix, because their developers come from Ruby, but Python developers will not fill lost.

Maybe you could evaluate the pros and cons of Phoenix against Django and Ruby on Rails in a future article?

Collapse
 
lewy_blue profile image
Lewy Blue | Discover three.js

I don't think Reddit uses Django, where did you get that info?

Collapse
 
davidmm1707 profile image
David MM👨🏻‍💻
Collapse
 
lewy_blue profile image
Lewy Blue | Discover three.js

The framework that seems most promising is Django and indeed we initially attempted to rewrite Reddit in it.

...and the entire rest of the article is spent criticising Django and explaining why they would never use it.

In that article (from 2005!) they say that use web.py.

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

This is really a good summary of the main points of what to select between Django or Ruby on Rails

Collapse
 
davidmm1707 profile image
David MM👨🏻‍💻

Requires more code upfront

I would like to see something like Class Based Views in other frameworks.