Live data from Hacker News

Prisma – Database tools for modern application development

prisma.io

41–50 of 88 posts

Re: Prisma – Database tools for modern application development

#41
post #39

Earlier quoted context omitted.

It’s not a database. SQL isn’t typed. And writing migrations and client libraries is otherwise painful. That’s basically the value add.

Sql is not only typed, its very strongly typed. Please dont confuse the lack of explicit annotations in typical sql for a lack of types. Sql is the prototypical killer app for type inference. Its so good, most people think it's untyped

Right. I think it was fairly clear what I meant, since Prisma cannot really help to change postgres internals (and strict typing in mysql is a bit hit&miss in the first place), but for the sake of everyone else reading this:

SQL results, coming without any translation layer, are untyped. Your result could be anything from a string to an array with an infinite number of fields.

It doesn’t really get more structure than this big array either, regardless of table representation.

Prisma helps with that.

Re: Prisma – Database tools for modern application development

#42

Forgive me the obvious elephant in the room - where is Swift and Java/Kotlin support?

Written in Scala, has a "greyed out" Python and Java client icon in the diagram at the very top of the readme, and an issue from Jan 2018 querying about a Java client which has had barely any traffic.

That's slightly weird, bit of a mixed messages situation!

Epilogue: Caveat emptor, rambling ahead. I probably shouldn't write comments when I'm tired.

Hasn't type safe ORM mappings and/or middleware, code generation, been done to death, at least for the JVM languages?

However, as I've been out of the Java loop for a bit, I'm not 100% sure of the stage of ORM like tools/libs today, I might be wrong.

If the admin UI is spectacular, and the migration flawless even with a fair bit of data, those could be useful tools. Neither are easy tasks though.

But still, I have to wonder, is there actually more ways to try to do it, to connect code and relational/graph data?

Feels like there has been so many attempts and that all of them has shown to have their various, by now, surely rather well known limitations?

Better is always possible, though.

However, except for mixing in a bit of graphql and having an additional server, I can't really see what it is they claim is so different?

Though I've been out of the loop for some year I can't have been the only one that have implemented/integrated a graph querying language on top of a ORM(-like) mapping with code generation, similar to Prisma? Or are there really no decent tooling of that kind, still?

Except for admin UI and real-time, I wrote something very similar back in 2007, or something like that. Unfortunately my client weren't interested in open sourcing it, back then it could have been somewhat original.

If I recall correctly, it was a customized Hibernate in the bottom, some code generation for Java - ASP - php - and maybe perl - clients, some fancy dependency injection.

Connect to the database and you got generated all code that was needed for a service you could query for tree fragments of almost arbitrary shape.

Essentially a GraphQL light I quess, as GraphQL wasn't available at the time, if it existed at all.

The http API used JAXWS I believe and it exposed few endpoints for some REST-ish+JSON and SOAP

You could do transactions over multiple requests if you wanted to, and weren't easily scared.

It could obviously prune circular graphs into trees, although that code had a few fun bugs initially.

No streaming though, as the client didn't need it.

Re: Prisma – Database tools for modern application development

#44
post #33

Looks like the traditional caveats for ORMs would apply here. Many painful lessons have been learned in that field. What would be interesting to see is the cost of change i.e. how de-coupled things are to make changes simple. Changes like: Adding a field To changing a relationship between entities and such.

That's a good question. As long as you have additive changes, Prisma can do the change automatically for you. As soon as it's a change where anything will be dropped (field, relationship etc), Prisma will prompt you and ask if you want to perform that breaking change. The only command you need to know for data model changes is `prisma deploy`. Disclaimer: I work at Prisma.

As someone who has been using Prisma religiously for the past year, I would like to express that this is the largest pain point of working with the platform. Not having the ability to custom define these transformations is brutal.

Re: Prisma – Database tools for modern application development

#45
post #41

Earlier quoted context omitted.

Sql is not only typed, its very strongly typed. Please dont confuse the lack of explicit annotations in typical sql for a lack of types. Sql is the prototypical killer app for type inference. Its so good, most people think it's untyped

Right. I think it was fairly clear what I meant, since Prisma cannot really help to change postgres internals (and strict typing in mysql is a bit hit&miss in the first place), but for the sake of everyone else reading this: SQL results, coming without any translation layer, are untyped. Your result could be anything from a string to an array with an infinite number of fields. It doesn’t really get more structure tha…

> SQL results, coming without any translation layer, are untyped.

That would depend on the database's wire protocol, wouldn't it?

Re: Prisma – Database tools for modern application development

#47
post #19

Back when prisma was emerging out of graphcool, every google documentation search sent me to graphcool, every graphcool page was full of broken links, and the shiny new prisma docs were unusable (including unviewable on my iPad that I use for researching tech I might use while sitting on the couch). It painted such a clear picture of a company that absolutely does not get the importance of API documentation to the su…

Thanks for your upright feedback! You must have caught us in a bad moment, in the transition one year ago from Graphcool to Prisma we indeed needed to do a lot of work in the docs. Nowadays the Google experience should be much better, while our docs actually represent the product. Would be great if you can give it another try, as I'm convinced that the docs improved significantly over the last year. Disclaimer: I wor…

They do look a lot better now in a way that suggests the doc side is maybe getting some actual love and attention. Will try to carve out some time to dig deeper.

Re: Prisma – Database tools for modern application development

#48
post #3

It's been interesting watching Prisma, formerly Graphcool, transition from backend-as-a-service to open source backend to client ORM library. They also use bleeding edge patterns, so I always know where to go for examples as stuff gets adopted mainstream :) Keep up the good work Prisma team! Question specific to this autogenerated client: does that mean I have to bump client version numbers every time my backend sche…

> They also use bleeding edge patterns, so I always know where to go for examples as stuff gets adopted mainstream :) Do you have specific examples of cutting edge patterns they use that you can share? I'm always interested in seeing concrete examples of (often) abstract patterns/concepts.

[deleted]

Re: Prisma – Database tools for modern application development

#50
post #19

Back when prisma was emerging out of graphcool, every google documentation search sent me to graphcool, every graphcool page was full of broken links, and the shiny new prisma docs were unusable (including unviewable on my iPad that I use for researching tech I might use while sitting on the couch). It painted such a clear picture of a company that absolutely does not get the importance of API documentation to the su…

Docs are pretty horrible to read on my phone, chrome on Android. Panels are getting put side-by-side and the text inside is smashed to like 8 characters across. Too much whitespace. It's like ok ok you've gone and designed the fuck out of your page, but why'd ya have to do it to the docs? Unreadable. Since it sounds like the devs are watching this thread I figured I'd mention it.
Post reply on HN