+ Less Magic
+ Better Migrations
+ Better ORM
+ Django Rest Framework
+ Admin Interface
+ Great Documentation
- Less Packages
- Python package management (a raging dumpster fire)
Ruby settled on a two-part solution, Rubygems and Bundler, over a decade ago. One is the package format, hosting server, and default distribution, the other is dependency management. In practice they are two sides of the same coin, and you don't have to give much thought to them. I hate reading reductive "It just works!" quips, but it really does apply here.
On the Python side I think the movement has started to fix the packaging mess. It's going to take a while me thinks.
> On the Python side I think the movement has started to fix the packaging mess. It's going to take a while me thinks.
I hope you are right, but ... this is the pattern: every year or two someone decides to fix it, goes about 80% of the way to a complete solution (which is maybe 50% of the effort, of course), that becomes 'the thing to use'. But then it is abandoned because that last 20% of functionality is a lot of work, and someone else comes up with a new shiny thing, and the cycle starts again.
Not holding my breath, in other words.
That's basically the same instructions you will have for ruby and javascript. Ruby package management is about as good as python's, while javascript is a toxic wasteland.
There are languages with better dependency management, and languages with worse ones (ok, not worse than javascript, no dependency management is still better than javascript). But python and ruby do not have much difference.
Yeah there's less magic I give you that, but also because it does much less.
Also for me the Python packages are a minus, they are usually not tested very well and it's very easy to burn yourself when migrating (good luck finding some equivalent of rspec)
That was probably only true 6–10 years ago. Migrations are a solved problem in Django and I can only think of one very obscure query that I couldn't get done in the ORM and had to drop into raw SQL. Aggregations, annotations and other query expressions in general have lifted the ORM to a truly strong position
Where are my scopes? Where's the equivalent of strong_migrations? The equivalent of db_consistency? Where are delegate attributes? Concerns? Arel?
The ORM isn't bad I'll admit that but some complex features are tedious.
I've never used rspec but it sounds like pytest and hypothesis would do the job. In ruby there's no hope for pytorch / tensorflow / ray / numba.
Sorry it really does not, having factorybot + rspec + rspec-mocks really is a super power when it comes in testing.
The issue is that most of the time I land on a django project, it has really poor testing whereas most of the time I land on a Rails project, it has very close to complete testing. The reason is that the tests are more tedious to write.
And this culture trickles down to your dependencies as well. Anything you install with rails is almost guaranteed to have the upmost quality of testing.
Have a look on the examples here https://github.com/rspec/rspec-mocks
Rails is a Web Framework. I don't understand the point about ML. Those categories are totally different. I guess it might be a tiny plus, but not very practical. Going this route one might conclude that game studios should build Websites in C++?
pytorch: https://github.com/ankane/torch.rb Tensorflow: https://github.com/ankane/tensorflow-ruby
Still, no information how they are better than the migrations in Rails?
We usually also want the “magic”.
I can’t argue with you about the ORM and Migrations since I haven’t used Django much. The feeling I get though comparing the two is that Django is more fixated on building business facing backends and Rails is more focused on building customer facing frontends.
Over all I would recommend figuring out if you are more of a Python/Django of Ruby/Rails type. It will tell you something about your personality.
As far as getting things done, well its probably the best admin site out there.
> Over all I would recommend figuring out if you are more of a Python/Django of Ruby/Rails type. It will tell you something about your personality.
That's a great insight and probably very true.
It is sort of sad but understandable.
That's why I usually don’t go with an admin framework like ActiveAdmin in Rails. It isn’t that hard to build some general functionality for the admin interface. And the admin interface frameworks I’ve worked with in rails where hell when you needed something special and in my experience there are always a lot of special cases.
Sure you get a less consistent interface and you can argue about how much more work you have to put in to the admin interface when compared to using a gem but you can shut up the customer request quickly and just move on with the none bikeshedding part of the work.
The migration framework just works, I can't really compare it to rails because I haven't used rails in a long time.
DRF seems much more fully featured than rails-api, it comes with a browsable API and OpenAPI integration.
Again I don't mean to trash on Rails, it's a great framework and miles ahead of anything you'd find in the nodejs ecosystem.
The question I was replying to was "What does Django offer that you feel is an improvement over Rails?" and I tried to answer it.
I wouldn't say that the ORM is better (in fact both ORMs are bad), but the way it integrates with everything is just awesome.
- Terrible templating system
- No equivalent to hotwire/livewire/liveview
- No built in jobs/scheduling system
- Insanely bad packaging and dependencies system
Deploying was also hell.
But it was fast, stable and once you solve a problem it is solved 100% .
Its frontend solution is a 90s monty python's joke.
Rails, Laravel, etc are real full stack frameworks.