Hacker News new | ask | show | jobs
by ethagnawl 597 days ago
I came through to note that most of this applies to Django, too.

I've historically preferred RoR but with the tremendous growth of Python in the last 10+ years, Django has become a more practical choice. ML and data science devs are already familiar with Python and, with the Django docs being as excellent as they are, these folks can be productive in a very short amount of time -- should they need to be. I've seen this firsthand on multiple projects.

Also, along with the author's case for the path of least resistance, the Django framework results in fewer "decisions" (arguments) about application structure than using a less opinionated library or micro-framework.

The Django/FLOSS community is also much more active than I was expecting it to be (Rails bias, probably) and has been very pleasant to interact with.

I only wish Django had Rails-like generators and in-built data seeding (e.g. rake db:seed).

3 comments

Django has been an absolute pleasure to work with. Contrast it to flask, which is a complete footgun factory. I agree 100% on there being (honestly, massive) value in reducing decision points in the project. Very few devs truly have the experience needed to see around the corners in their designs and architecture, and Django represents the culmination of decades of learnings on what works, and works well.

Overall, I’ve been very impressed with the product and maintainers. There are so few OSS projects that rise or the level of quality that Django has managed to achieve. Now if only they could sort out type hints ;).

You can seed with JSON files as "fixtures" and run `python manage.py loaddata fixturename`.

The thing I wish Django had better OOTB support for is background tasks, I've not used it but I understand this is very well done in Rails and Laravel.

Interesting! I will give fixtures a look. I've shied away because -- unless you introduce a manual step to generate them, my understanding is that they're static.

You're spot on about background jobs. Rails added support 2-3 major versions ago and there's no shortage of back-ends. With Django, it seems to be Celery-or-bust and there's no Django API that I'm aware of. I actually recently rolled my own solution using SQS and a dedicated compose service which runs a management script (in the Django context). It works but ... it's klunky, the API is ad hoc and there's no monitoring/retries/etc.

I picked up Django as my web server of choice this year and found the same delightful to work with. Given I generate content outside of the django app I had to roll my own data seeder.

It’s actually quite straightforward using CSVs and models to load each row in.

Can see it getting complex once I need to seed a large dataset or with loads of relationships. Look forward to seeing an official 3rd party app that takes away the complexity from my code base for seeding.

I've been using django-seed and it's fine. The API is a little confusing, it hasn't been updated in years and there are some sharp edges (e.g. auto-M2M2M).

Yes, to your point, it would be great to see the jazzband project adopt/anoint it or another solution.