“ Application developers should care about data – not SQL” Anyone who has been bitten by an ORM generating inefficient SQL (and subsequent having to learn and care about SQL) knows the above not to be true.
I agree, and find the reluctance to care about SQL interesting. Sure, SQL is not perfect, and has it’s flaws. But instead of learning an established, declarative language designed for data access, there are developers that would much rather learn new tools and libraries to avoid it. If you need to use another programming language for data access, you’re off looking for another ORM. Or the next, better ORM of the year…
Prisma – ORM for Node.js and TypeScript
101–110 of 260 posts
Re: Prisma – ORM for Node.js and TypeScript
#102I have adopted Prisma in my latest project and I have mixed feelings about it. - The generated client is top-tier. Fully specified in TypeScript with intelligent types that can be extended by the user. - The schema language is great. It provides a cohesive experience that can fully express your database structure, and it also provides a migration framework to manage that structure's evolution. - There's no hook for i…
On testing, we're working on some documentation right now on how to mock the Prisma Client. I could see us generating a mockable client to help with this.
Re: Prisma – ORM for Node.js and TypeScript
#103What is the business model for them? It seems that an ORM in and of itself is not sustainable, especially one that is free.
Re: Prisma – ORM for Node.js and TypeScript
#104Re: Prisma – ORM for Node.js and TypeScript
#105“ Application developers should care about data – not SQL” Anyone who has been bitten by an ORM generating inefficient SQL (and subsequent having to learn and care about SQL) knows the above not to be true.
This statement is certainly provocative (great that it was the first thing picked up here :D) but I'm happy to explain our rationale for this a bit more. SQL is an impressive technology and has stood the test of time! Yet, we claim that it's not the best tool for application developers who are paid to implement value-adding features for their organizations. SQL is complex, it's easy to shoot yourself in the foot with…
Re: Prisma – ORM for Node.js and TypeScript
#106I am over ORMs. I am looking at the documentation for Prisma Client at the moment, and I just think to myself "yet another ORM I have to learn". I have learnt so many ORMs, it is just stupid. SQL is SQL. I wish I had spent all that time further developing my SQL skills rather than learning the latest ORMs API. For my latest large project, I just used SQL and I am happy. All I did was add some code to make sure the sn…
They have a vs code extension for editing the prisma schema.
It’s not hard to see that you make fields “String” @unique, etc.
Just make one model and that’s 80% of anything you ever need.
Want to make a relation? Make a new model
model Posts { users User[] }
Hit save, it adds the required code to relate it to the User model.
Run the generate command. Make a client instance.
Create something: db.NameOfModel.create()
And as you’re typing, typescript is auto completing it.
There’s barely anything else to learn. And it’s a quick doc search away.
Don’t hate on it because you love sql, it’s a great tool.
Re: Prisma – ORM for Node.js and TypeScript
#107Earlier quoted context omitted.
This statement is certainly provocative (great that it was the first thing picked up here :D) but I'm happy to explain our rationale for this a bit more. SQL is an impressive technology and has stood the test of time! Yet, we claim that it's not the best tool for application developers who are paid to implement value-adding features for their organizations. SQL is complex, it's easy to shoot yourself in the foot with…
I think SQL gets a lot of undeserved praise that I’m having a difficult time understanding. The only impressive thing about SQL is its prevalence but that’s a pretty poor yardstick unless one thinks that an appeal to popularity is an indicator of quality. Now let me count the ways in which SQL is bad: - it composes poorly due to its unwieldy cobolesque syntax - it is a leaky abstraction revealing a lot of underlying…
Re: Prisma – ORM for Node.js and TypeScript
#108“ Application developers should care about data – not SQL” Anyone who has been bitten by an ORM generating inefficient SQL (and subsequent having to learn and care about SQL) knows the above not to be true.
This statement is certainly provocative (great that it was the first thing picked up here :D) but I'm happy to explain our rationale for this a bit more. SQL is an impressive technology and has stood the test of time! Yet, we claim that it's not the best tool for application developers who are paid to implement value-adding features for their organizations. SQL is complex, it's easy to shoot yourself in the foot with…
Often times it's much better to be able to lookup some object by ID of the entity from some Map, than consuming endpoints returning some crazy nested partial data for the current view.
Depends on how much your app relies on client side caching and incremental sync of data.
Re: Prisma – ORM for Node.js and TypeScript
#109I am over ORMs. I am looking at the documentation for Prisma Client at the moment, and I just think to myself "yet another ORM I have to learn". I have learnt so many ORMs, it is just stupid. SQL is SQL. I wish I had spent all that time further developing my SQL skills rather than learning the latest ORMs API. For my latest large project, I just used SQL and I am happy. All I did was add some code to make sure the sn…
It took me all of 1 hour to learn how to use prisma. It’s not as hard as you make it seem. They have a vs code extension for editing the prisma schema. It’s not hard to see that you make fields “String” @unique, etc. Just make one model and that’s 80% of anything you ever need. Want to make a relation? Make a new model model Posts { users User[] } Hit save, it adds the required code to relate it to the User model. Ru…
That is not how this works at all. You don't know what you don't know until you need "how do I do this query in prisma". You then spend an hour trying to figure it out, and maybe it isn't possible, then on to the next thing. It takes more than an hour to learn SQL, so if it takes you an hour to learn Prisma, you are missing something.
Re: Prisma – ORM for Node.js and TypeScript
#110I'm completely perplexed at some of the functionality that's absent in Prisma? I'm coming from the Rails/Django world for reference. Can anyone help me understand if I'm out in left field or does this technology only cover basic use cases? - No supported way to do a case-insensitive sorting. https://github.com/prisma/prisma/issues/5068 - Can’t sort by an aggregate value like user’s post count. https://github.com/pris…