3 ms·
Those are all intentional choices and benefits of Python 1. This gives you flexibility to structure your app in a way that makes sense for what you're doing. I
by pythonaut_16 10y ago
Those are all intentional choices and benefits of Python
1. This gives you flexibility to structure your app in a way that makes sense for what you're doing. In addition, I've found Django's approach to modular apps to be far more manageable and approachable than Ruby's "all the controllers go in the controllers folder" approach.
2. Explicit imports is a Python thing and a huge benefit. I've looked at plenty of Rails code bases where I had no idea where different functions and variables were coming from. In Python/Django, you can always see the explicit definition at the top of the file.
3. The "crippled down" templating language is very intentional as well. Django is preventing you from writing your application in the templating logic (something I've seen too much of in Rails) All your template should be doing is specifying how the data is to be rendered in HTML/whatever.
Really Python/Django could be said to be Ruby/Rails flipped on it's head.
Ruby itself isn't very opinionated (there are usually several ways to do something), while Rails is.
Python itself is pretty opinionated (there should be one right way to do things), while Django isn't.
In general it's a matter of opinion and perspective but I personal find Python and Django to be much easier to work with than Ruby and Rails.