Recently I was going through an assignment utilizing Ruby on Rails (RoR) and it had been some time since I created a backend or an API for that matter as most feature web applications have most of the functionality stored on the front end and the backend is used to interact with the database. At first, I thought I might be missing a couple of steps to start getting things rolling but RoR has a ton of functionality and gems for every occasion that made it very easy to have the assignment foundation working in under an hour. It got me thinking was this the same workflow and duration it takes to get something working utilizing Django the Python framework that is just as popular? But this was the wrong question to ask or answer as the better inquiry is what are the scenarios RoR excels and which ones do Django?
My initial thought was which handles complexity better? This is where I think Django shines because of the core principles that are its foundation. One being simplifying complex database-driven web applications. because of this simplified form factor Scalability is at an all-time high. Both Django and Python are generally referenced as the most readable framework and programming languages which makes them easy to learn start building with quickly.
So where does that lead Ruby on Rails and Ruby? Both are also known for fairly simple and understandable syntax. The areas where they both shine is how flexible and open as a programming language it can be. Ruby by design was meant to have a huge emphasis on being an enjoyable language making it a great starting point for and developer's education and career. My personal bias can show here because RoR was where I began my journey into development.
We can view a summarized breakdown of some clear points for both frameworks below.
Looking at the chart you can see a lot of diverging philosophies for both frameworks in question. Django at its core will appear to be very pragmatic whereas RoR seems a bit looser with its convention. On the outset this makes RoR take the lead in flexibility and modularity ever so slightly. But with that flexibility comes a price because with this added freedom the return is also added complexity because the language is so freeform. Whereas Django does not let you bend any rules and expects complete adherence to framework rules. Because of this, the expectation is always set up first with more development upfront.
We see a pretty clear picture for the negatives but we still haven't answered the underlying question of where the frameworks excel at a fundamental level. This is where design objectives clarify the picture. Because of the linearity and conformity, Django requires creating APIs and developing Endpoints for data analysis and Database reporting becomes the primary intention. This is because each building block and endpoint has the same checklist of features and customizations that can be applied. This uniformed approach makes querying a Database seamless.
While Django has its effectiveness in simplifying database interactions. RoR shines in the modularity and ease of testing which can be a boon when you are making specialized modifications. This is further emboldened by the component structure that promotes Plugins and Gems(modular pre-coded functions) which in the end equates to less coding. Furthermore, the added benefit is that RoR has one of the best if not the superior testing environments for almost all known web frameworks. This may seem like a small benefit but because of the robust testing capability, the conventionalism shines for the framework because the specificity that can be generated will always be unparalleled when properly tested.
All in all, this amounts to that the answer to the original question is both frameworks have specific use cases in mind when they are actively used. If a web application is going to be making big data readable and report with highly detailed analysis Django is your go-to. However, if you are looking for modular quick launch, iterative development where you can scale as you go Ruby on Rails is your best bet because of the added automation features that excel at adding complexity.