5 ms·
Not surprising for a product/library that far down on the "magic" scale. I don't know what it is about the TypeScript/JavaScript/NodeJS world that keeps seekin
by catlover76 3y ago
Not surprising for a product/library that far down on the "magic" scale.
I don't know what it is about the TypeScript/JavaScript/NodeJS world that keeps seeking ever more magical and oppressive and comprehensive solutions to accomplish tasks and goals that software has been capable of achieving for some time now.
Knex is a good ORM for a NodeJS back-end. It's simple and generic. It does the job while giving developers sufficient flexibility. I just can never see the appeal of things like Prisma.
- trinovantes 3y agodrizzle-orm is another good JS sql query builder I'm able to write raw sql queries with the `sql` template literal function https://orm.drizzle.team/docs/sql https://orm.drizzle.team/docs/sql
- catlover76 3y agoLooks cool, thanks for sharing
- droptablemain 3y ago+1 for Drizzle. I was really drawn to Prisma because it seemed elegant, but the problems surfaced by this blog post are really concerning.
- joshxyz 3y agothere's also https://kysely.dev/ https://kysely.dev/ but personally i handwrite my queries with https://github.com/porsager/postgres https://github.com/porsager/postgres for flexibility and performance most orms use node-pg lib which has shit performance.
- ShadowBanThis01 3y agoI'm hand-writing stuff right now for Deno with MariaDB. Is there a "default" or "native" Postgres client, and what makes Porsager better if so?
- joshxyz 3y agoThere's a core client interface here: - https://www.postgresql.org/docs/current/client-interfaces.html https://www.postgresql.org/docs/current/client-interfaces.ht... On what makes it postgres.js faster, from author himself: > it seems Postgres.js is actually faster than, not only pg, but of any driver out-there - https://github.com/porsager/postgres/discussions/627 https://github.com/porsager/postgres/discussions/627 - https://porsager.github.io/imdbench/sql.html https://porsager.github.io/imdbench/sql.html
- ShadowBanThis01 3y agoThanks for the reply!
- chrisandchris 3y ago> Not surprising for a product/library that far down on the "magic" scale. [...] Using MongoDb with AWS Lambda and join it with 10 another services to serve a GraphQL endpoint just sounds much better than any PHP/Python REST API backed by MySQL. No wonder you'll end up from time to time with things you'll deeply regret.
- sgarland 3y agoBecause the entire Node ecosystem is deeply unserious. The base premise of “let’s use a frontend language which asserts that 1+one == 1one as a backend” is fundamentally flawed. That, and the existence and popularity of things like left-pad, speaks volumes.
- toastercat 3y agoThis is an outdated take. The left-pad incident was 7 years ago, and newer mainstream packages are generally doing a better job curating dependencies. That said, it is true that the Node/JS world is primarily hype-driven by "thought leaders" and people seeking personal brand and clout. Go on JS/React Twitter and prepare to loudly groan at the self importance on display. There are good packages out there that try to do things in a sane way without wasting your time. Postgres.js [1] is one of them. [1] https://github.com/porsager/postgres https://github.com/porsager/postgres
- SebastianKra 3y agoI'm not even old and I've already heard this a million times: "Nothing wrong with software development anymore. So let's just solve the same problems and write the same workarounds over and over again, while complexity explodes". I can absolutely see the appeal of Prisma, even though I wouldn't use it. The only Problem with the JS ecosystem, is that we need more discussion of the drawbacks, like this article. Too often, a new solution is paraded as the definitive next step, before we can even know that. On the other hand it's neat that I can mix and match my dependencies based on how progressive/conservative I want to be. (Knex isn't an ORM)