Picking an ORM is Getting Harder...

Ғылым және технология

Prisma is one of, if not maybe my favorite technologies out there. But over time I have been gravitating to drizzle more, and more, and more, however there are some compelling things coming in the Prisma world that are gonna make it more compelling than EVER, very, very, soon.
PRISMA ARTICLES LINKS
edge: www.prisma.io/blog/database-a...
serverless: www.prisma.io/blog/prisma-and...
JOIN THE DISCORD: / discord
my stuff
twitter: / benjamin41902
insiderviz: www.insiderviz.com/
#serverless #typescript #database

Пікірлер: 41

  • @bmdavis419
    @bmdavis41910 ай бұрын

    TWO THINGS: first, the SvelteKit deep dive is almost done, currently I am just struggling with trying to figure out how to explain/frame/handle the different file types (page.svelte, layout.svelte, server.ts, page.ts, page.server.ts, etc). Its tricky, and I really want this one to be done correctly. Second, the AC is out and its 95 degrees here so sorry about the tank top (sort of 😈)

  • @kenobi6020

    @kenobi6020

    9 ай бұрын

    Hey Ben, love your videos! I'm learning Go after working with Node for a couple of years now and your videos have been really helpful. Have you seen htmx? I think htmx + Go can be the sveltekit + Go that you dreamed about. Keep it up with the good work!

  • @SRG-Learn-Code

    @SRG-Learn-Code

    9 ай бұрын

    No AC = I have to report this video because of those guns 😎😎

  • @Mindflays_
    @Mindflays_10 ай бұрын

    I had no idea about this new direction of prisma and I use it lol thanks ❤ love your content keep it up man

  • @zkoolkyle1
    @zkoolkyle110 ай бұрын

    Big fan, keep up the solid content 🎉❤

  • @mmzzzmeemee
    @mmzzzmeemee10 ай бұрын

    Where'd you find info about supabase's concurrent connections? I'm also curious about planetscale's lack of foreign key constraints. I'm pretty new to DBs so i don't know much about the long-term effects, so maybe you can also make a vid on this? (And maybe other things about supabase vs planetscale as well)

  • @bmdavis419

    @bmdavis419

    10 ай бұрын

    supabase.com/blog/supabase-pgbouncer

  • @mmzzzmeemee

    @mmzzzmeemee

    9 ай бұрын

    ​@@bmdavis419 thanks would also be nice to (if you're going to make a video on it) to see how this would potentially affect production apps (i guess around 10k+ MAUs or something)

  • @boniedwin
    @boniedwin9 ай бұрын

    my company use oracle, so yeah only sequelize for now even some function are write in raw sql, since it's a very complex query

  • @WyzrdCat
    @WyzrdCat10 ай бұрын

    Drizzle just seemed like the safer choice right now. Building a single very large app so unfortunately had to make that decision pretty early and it will affect things for a very long time

  • @greenlines1208
    @greenlines120810 ай бұрын

    looking buff! bro 💪

  • @DevlogBill
    @DevlogBill10 ай бұрын

    Hi Ben, are a lot of companies using these newer types of databases like Prisma? I just started backend development earlier this year and I am using the basic traditional SQLite3, MySQL and I was curious is it worth learning these newer types of databases for landing a job? Thanks!

  • @massy-3961

    @massy-3961

    10 ай бұрын

    These are ORMs not databases. In fact, you can use these on top of SQLite and MySQL to make those databases easier to work with. As far as are companies using them? Well, production tends to be grandfathered, battle tested, opinionated, scalable frameworks, and I don’t think companies are transitioning just yet.

  • @ooijaz6063

    @ooijaz6063

    10 ай бұрын

    To be honest I would lean towards query builder such as Drizzle or Kysely, prisma provides great DX, but I doubt anyone will ask you so much about an orm on the interview. Raw SQL is always needed in bigger projects (for some queries), so if you know SQL, picking up any ORM won't be such a big deal. Especially in JS ecosystem, where everything changes daily, it's important to understand the logic behind the scenes.

  • @mmzzzmeemee

    @mmzzzmeemee

    10 ай бұрын

    I'm about to learn on ORM and I'm leaning towards drizzle. One common criticism I've heard of prisma is that when you need complex queries, it's hard to write them. Does drizzle allow plain sql queries?

  • @DevlogBill

    @DevlogBill

    10 ай бұрын

    @@mmzzzmeemee I haven't tried out drizzle yet but I think I may tomorrow and I just need to figure out if I am able to import drizzle into my Django project. I will post a message stating if I failed and of my experience to share with others.

  • @ooijaz6063

    @ooijaz6063

    10 ай бұрын

    @@mmzzzmeemee Yes, drizzle do have special Template literal sql; you can write raw sql using it.

  • @MrSparc
    @MrSparc9 ай бұрын

    We at my work are against ORM frameworks as the experience had proved in production environments with hundreds of customers and transactions per secs we had to deal with big performance issues. The syntaxes and easy code of a framework has the reverse side of the coin with a black box that generates SQL queries to your DB that aren't optimized for the tasks you're using. We saw on DB logs ORM generates SQL queries with hundreds of unnecessary fields, joins, and transformations for tasks that you paid with slow DB responses. And this kind of issues only are raised in production environments or with real workload tests. So, a word of caution every time you use a ORM take a look the generated SQL and profile the performance of your system with real scenarios.

  • @lazyh0rse
    @lazyh0rse10 ай бұрын

    drizzle honestly seems like a clone of laravel orm. It's not bad, but prisma is miles better and the syntax is much easier to reason with imo. Either sql or just make it more like object (typescript). I hate the in-between with really no benefit aside from making you locked down to using their orm.

  • @neon-gi5tb
    @neon-gi5tb9 ай бұрын

    What your thoughts on Laravel?

  • @bmdavis419

    @bmdavis419

    9 ай бұрын

    Never used it so I don’t really have anything intelligent to say other than I don’t like php lol (although that does not mean laravel is bad)

  • @user-pd2ic5pd3z
    @user-pd2ic5pd3z10 ай бұрын

    Are ORMs vulnerable to SQL injections?

  • @deado7282

    @deado7282

    10 ай бұрын

    It depends, but most of them are not. Still, proper validation is necessery in any case.

  • @au2001
    @au200110 ай бұрын

    Surprised you didn't mention TypeORM nor Sequelize, any thoughts on those two?

  • @tomorrowlimit6999
    @tomorrowlimit69999 ай бұрын

    I really wanted to use drizzle, the query sintax is really great and nothing comes close to it's prepared statements. But the table definition schema sucks, that's the only thing keeping me from using it. My current setup uses Prisma for schema definition, migrations and prisma studio, but with kysely instead of prisma/client, so no prisma binaries on production builds. There's generators for transforming prisma schemas into kysely interfaces, which work great in CI steps. Drizzle just hasn't a generator, and my team is already familiar with the prisma schema sintax. I do prefer drizzle over kysely, but the dev experience of prisma makes it not worth it. I wish I could integrate drizzle with prisma like I did with kysely. Kysely is mostly fine, the sintax is very close drizzle's query builder and knex, but I miss ORM-level mapping and decent prepared statements.

  • @savire.ergheiz
    @savire.ergheiz10 ай бұрын

    orm is the issuse in the first place. its not really needed 😂

  • @mentalmarvin
    @mentalmarvin10 ай бұрын

    I thought you were gonna learn rust

  • @bmdavis419

    @bmdavis419

    10 ай бұрын

    Yea that might happen someday but idk I kinda doubt it lol

  • @Kats0unam1
    @Kats0unam19 ай бұрын

    I still think JS on the backend is a mistake.

  • @sleekism

    @sleekism

    9 ай бұрын

    why?

  • @Kats0unam1

    @Kats0unam1

    9 ай бұрын

    @@sleekism Its so easy to make memory mistakes for example like leaking memory... Javascript is a powerful language but was never intended to be used on the server.

  • @abdirahmann
    @abdirahmann10 ай бұрын

    Ben, im sorry. Why don't you JUST WRITE SQL??, here's what my take and the problems am trying to avoid, ORMs dont really teach you SQL which if you are a beginner, you'll have a very roigh time with databases of any kind, 2ndly most of the industry uses JUST SQL because ORMs become very limiting when you start doing complex queries e.g drizzles many-to-many relations syntax is just pure garbage!, 3rd there is a very high chance that you are writing SQL for complex queries already, why dont you just go with SQL??

  • @bmdavis419

    @bmdavis419

    10 ай бұрын

    Often times I do, but there are also a lot of places where having an orm is really really helpful, for trivial CRUD operations having easy out of the box types and syntax makes your life a hell of a lot easier. I think that drizzle is the best balance where it is pretty much TS with SQL. There can be a lot of headache going pure sql, but getting as close as possible is good imo. I do full agree about beginners though, you should reach for an orm when u don’t feel like writing a bunch of selects and adding types yourself, not to learn. Also both of these ORMs allow u to write custom SQL queries which solves for the really complex weird stuff u run into (which trust me I have)

  • @andgate6204

    @andgate6204

    10 ай бұрын

    ORMs are good mostly for typechecking.

  • @user-nx4pr7xt1p
    @user-nx4pr7xt1p10 ай бұрын

    why the hell do we even need ORMs? Why are you talking about it like you fell in love with it? Just write SQL?

  • @ooijaz6063

    @ooijaz6063

    10 ай бұрын

    SQL is great, but writing raw SQL for fast iteration is not the best thing to go with. Every change to the schema means that you need to check every SQL query and adjust it manually. Without an ORM you usually need to manually map the rows to the schema, which means more code, which means more potential bugs. Every large project uses some kind of ORM or ORM-ish query builder, there is no real way around it. Raw SQL is always used for the complex queries.

  • @thienhuynh7962

    @thienhuynh7962

    10 ай бұрын

    ⁠@@ooijaz6063 Raw sql is also written for performance critical queries, database testing and many more as well

  • @mohamedelsayed1868

    @mohamedelsayed1868

    9 ай бұрын

    @@ooijaz6063 daaah performance gets fkd there is no better than sql + oop the most readable application u could ever make same if make change to the schema u gonna need to check ur code which means more potential bugs using an orm means u cant write sql its as simple as that using sql gives better utilization in ur queries and better performance

  • @tomich20

    @tomich20

    8 ай бұрын

    exactly. In my big projects i saw my self building my own ORMs, and even with that, duplicating queries, and having vulnerabilites. Now im teaching my self PRISMA just to save time on the future. Limitations: there are some many-to-many queries that are almost impossible with prisma, but they let you mix it with your own RAW queries. @@ooijaz6063

Келесі