Remix.run Logo
megaman821 3 days ago

As a long-time Django user, I would not use Django for this. Django async is probably never the right choice for a green-field project. I would still pick FastAPI/SQLAlchemy over Express and PostHog. There is no way 15 different Node ORMs are going to survive in the long run, plus Drizzle and Prisma seem to be the leaders for now.

ccanassa a day ago | parent | next [-]

FastAPI/SQLAlchemy won’t be more scalable than a typical Django setup. The real bottleneck is the threading model, not the few microseconds the framework spends before handing off to user code. Django running under uWSGI with green threads can outperform Go-based services in some scenarios, largely thanks to how efficient Python’s C ABI is compared to Go.

raverbashing 3 days ago | parent | prev | next [-]

Agree

Django is great but sometimes it seems it just tries to overdo things and make them harder

Trying to async Django is like trying to do skateboard tricks with a shopping cart. Just don't

liquidpele 3 days ago | parent [-]

Async in Python in general really… The way they implemented it is basically a valley of footguns and broken dreams.

morshu9001 3 days ago | parent | prev [-]

I'd skip the ORM, Postgres is already designed for direct use on backends.

eYrKEC2 2 days ago | parent | next [-]

Much as Lisp'ers say,

    Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
If one says, "we don't use an ORM", you will incrementally create helper functions for pulling the data into your language to tweak the data or to build optional filters and thus will have an ad hoc, informally-specified, bug-ridden, slow implementation of half of an ORM.

There is a time and place for direct SQL code and there is a time and place for an ORM. Normally I use an ORM that has a great escape hatch for raw SQL as needed.

morshu9001 2 days ago | parent [-]

I've always used SQL directly since I stopped using ORMs, and it didn't result in a halfway implemented ORM. Maybe back when there was no jsonb for your blob o' fields cases, it was different.

But yeah don't do a high level lang's job in C or C++

ccanassa a day ago | parent | prev | next [-]

The main advantage of an ORM isn’t query building but its deep integration with the rest of the ecosystem.

In Django, you can change a single field in a model, and that update automatically cascades through to database migrations, validations, admin panels, and even user-facing forms in the HTML.

remify 2 days ago | parent | prev | next [-]

ORMs are mostly useless they make easy queries easier et hard query a lot harder.

mrits 3 days ago | parent | prev [-]

I'd skip the ORM as well but your reasoning doesn't make any sense

3 days ago | parent [-]
[deleted]