Hacker News new | ask | show | jobs
by powersurge360 1435 days ago
Hey there! I've done a lot more Django than I've done rails, but have had both in my job title at different points in my career. My favorite language is python but my favorite development platform is Rails. They're mostly comparable but Rails wins for me. Rather than type it all out in prose I'll just give a short little blurb about what you get and don't get with one and leave the rest as an exercise to the reader:

What you get with Django but not with Rails:

- An admin panel out of the box

- Python (which is a big win for me personally)

- Authentication out of the box, but still fairly basic

- A robust library of third party packages that benefits from python being used much broader than the web space.

- Class based views (this is the biggest thing I miss, by _far_)

- Better LSP support

- Django REST framework (rails isn't _quite_ as good but you can get kinda close by leveraging resourceful routing and the serializers that ship with rails)

What you get with Rails but not with Django:

- Websocket support out of the box (but not the greatest performance. A third party drop in replacement [Anycable] makes it much better)

- First party API for background jobs (but it requires a third party background job system to wrap, like sidekiq)

- First party integration of a JS solution (import maps)

- Second party integration of a JS bundler (js-bundling, written by rails authors but not included by default)

- Hotwire (although Django trivially integrates w/ a comparable technology, htmx, Hotwire is still pretty dope)

- Rspec and the rest of the Rails testing ecosystem (guard, VCR, factory_bot, capybara). Python has ports of some but not all.

In my mind, Django adopted just two things, I'd be very happy. I'd love to see a better async story in Django that would enable web sockets and stuff. And the second thing I'd love to see is a better story out of the box for playing nice with frontend build chains. And, as a distant third, I'd like to see an html-over-the-wire technology like HTMX favored and some light integration in Django to recognize some headers so it can switch between sending just template segments or if it should send one w/ the layout included. The testing ecosystem I don't think is possible for Django to lift on it's own and I'm prepared to miss it while I'm away. That other stuff, though, is unfairly aging Django imo.