I Would Never Use an ORM, by Matteo Collina

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 211

  • @johnwales77
    @johnwales77 2 года назад +212

    For projects where the biggest concern is not squeezing every ounce of performance out of every thing you do. ORM for me offers more pros than cons. And you can still write raw parameterised queries for more complex queries.

    • @8forty
      @8forty 2 года назад +2

      Umm, nice strawman argument I guess? Did you even watch the video?

    • @johnwales77
      @johnwales77 2 года назад +8

      @@8forty I did finish watching the video after my comment. I did like some of his arguments, and could relate to them.

    • @dyto2287
      @dyto2287 2 года назад +16

      It's still a useless abstraction. SQL is the language meant to be used for interacting with data. No need to pick libraries and it stays the same in all backend programming languages you use. No need to learn a different library if you start coding in different language. If you use ORM means you don't know SQL and never will learn it because ORM will hide it from you.

    • @zzzyyyxxx
      @zzzyyyxxx 2 года назад +5

      @@dyto2287 I don't want to learn SQL though, I want to get shit done. If I can use an ORM why wouldn't I?

    • @SEOTADEO
      @SEOTADEO 2 года назад +6

      @@dyto2287 That's bullshit. You can write arbitrary unchecked SQL that can lead to all sorts of bugs. With ORMs in statically typed languages that are synced with the database schema you can at least guarantee that all calls to the db are valid and your program won't even compile if you do something stupid. Can you do that with pure SQL? No.

  • @Thristle
    @Thristle 2 года назад +79

    Never use an ORM unless it's *my* ORM

  • @flogginga_dead_horse4022
    @flogginga_dead_horse4022 2 года назад +288

    Won't use an ORM but writes backend code in JS. Close video. ;)

  • @ParkImaging
    @ParkImaging 2 года назад +83

    You lost me at "never". No reason to start what should've been an open-minded discussion with a dogmatic statement. I prefer a pragmatic approach to building large systems and leave out "never" from the discussion.

    • @PaulGaida69
      @PaulGaida69 2 года назад +2

      I think nowadays it is an easy way to call for attention in this pseudo controversial approach.

    • @DevinRhode2
      @DevinRhode2 2 года назад

      Why’d you click the video lol

    • @mishasawangwan6652
      @mishasawangwan6652 2 года назад

      you lost

    • @heroe1486
      @heroe1486 Год назад

      The reason you clicked and why they do that

    • @robertfletcher8964
      @robertfletcher8964 9 месяцев назад

      thats quite a short sighted dogmatic statement ;)

  • @marco.garofalo
    @marco.garofalo 2 года назад +11

    The argument against MVC is very fuzzy, people keep misunderstanding MVC all the time, the latter is a delivery mechanism, the "M" in MVC is not a domain model, nor a persistence model, is a presentational/transport layer model, so it has nothing to do with the database.
    Also what does it mean to have only 3 places to write the code, and the 2000 models argument? In a clean architecture, that promotes separation of concerns, the MVC pattern would be something applied at the infrastructure layer, the business logic would go in the domain which, obviously, is unaware of delivery and persistence mechanisms.
    The argument around a huge explosion of models is also a bit unrealistic, let's assume we have a traditional CRUD set of operations per resource we would have: C using 2 models (request and response payloads), R using 1 model (response payload), U using 2 models (request and response payloads) and D using no model, so saying we will soon have 2000 models will translate into managing around 200 resources, something that IMHO does not fit well in a single application, is now a huge monolith with 200 reasons to keep changing.

    • @chauchau0825
      @chauchau0825 2 года назад

      agree..very few people actually understand MVC only exists in presentation layer

  • @PiletskayaV
    @PiletskayaV 2 года назад +43

    2000 models is 2000 tables in a database. Let's do it without ORM and define 2000*x functions for managin those tables where x is all necessary operations like add row, read, update etc.
    If you have 2000 models in your project it is not an ORM's problem. It's a problem of a dev who can not build a good architecture for his project.
    Also... building backend in js? I would question this part of a video rather then any ORM related issues.
    This video is some kind of an out-of-season april fools joke I guess.

    • @hardcorecode
      @hardcorecode 2 года назад

      I can see 2000 models. especially if most of them are linking tables. for example in My project I have 10 tables and almost 90 linking tables. I chose spring boot for this and very happy with the results!

    • @aryabp
      @aryabp 2 года назад +1

      yea we can build backend in js using node js with express lib and pg lib (postgre)

    • @heroe1486
      @heroe1486 Год назад

      @@aryabp That's what he questions, talking about JS is just easier than naming the runtime (node deno bun etc) and groups them all

    • @sampri22
      @sampri22 7 месяцев назад

      @@hardcorecode can you give an example why so many linking tables? Thx

    • @hardcorecode
      @hardcorecode 7 месяцев назад +1

      @@sampri22 The project I am working on isn't typical because the project requirement states that each entity need to have a direct many to many relation to each other in both directions threfore 10*10 subtract self references and you have got 90 linking tables. We would never have attempted this project without an ORM. It would be impossible to maintain! The real world is nuts!

  • @muharief3885
    @muharief3885 2 года назад +15

    I would never use javascript for backend.

    • @hardcorecode
      @hardcorecode 2 года назад +1

      How about NextJS? I prefer react (frontend) and spring boot (backend) but NextJs features and extreme flexibility are very tempting!

    • @handsanitizer2457
      @handsanitizer2457 2 года назад

      @@hardcorecode no *hits head with newspaper

    • @heroe1486
      @heroe1486 Год назад

      @@hardcorecode NextJS "backend" = bare express + limitations of serverless if you deploy to Vercel, it's nothing comparable to a framework like Spring

  • @onyilimba
    @onyilimba 2 года назад +16

    I kept trying to understand what he's talking about, I kept loosing his point every 30 seconds.

  • @georgeFulgeanu
    @georgeFulgeanu 2 года назад +71

    This guy is definitely a genius, the way in which he proves that ORM is bad is horrible. Like I haven't seen so many bad arguments in the same place. Not only is he USING an ORM he wrote a code generation framework in which based on the table structure it generates CRUD for each db, which is a bit bad to expose everything and not having the possibility to alter the code inside. The JS community still has decades to catch up to mature ecosystems like C# , Java, Python, PHP.
    Side note: we also avoid ORMs when we need to make sure performance is the most important factor, which rarely is but that's another discussion.

    • @fabionunes2793
      @fabionunes2793 2 года назад +8

      Good point. I used a lot if orm for commercial solutions that are not intended to be super fast, but they have pretty complex business rules. So, orm is a great deal, because basically you are going to only implement what really matters.

    • @gonkong5638
      @gonkong5638 2 года назад +2

      Yeah I really hate ORM. Especially hibernate.
      But i don't see any alternative way for my job.

    • @thisisnotok2100
      @thisisnotok2100 2 года назад

      @@gonkong5638 well, I guess it would be queries lol

    • @Lexaire
      @Lexaire 9 месяцев назад

      Some companies have over 2000 models! That's crazy! We need a solution! Here's my codegen framework that still ends up with 2000 models.......... Also you don't need codegen if you use your models to create your migrations. He's just shifted the work from models to raw SQL migrations whereas ORM users write the models instead of the raw SQL migrations. He hasn't gained anything.

  • @ПожилойСкарабей
    @ПожилойСкарабей 4 месяца назад +2

    I Would Never Use an ORM -> Proceeds to use his ORM which abstracts generation of GraphQL and Rest endpoints in itself, yay!

  • @FooCo2009
    @FooCo2009 2 года назад +8

    2min in, why orm is bad:
    - you are not able to handle 2000 models
    - there is no place to put the business logic but controller or model
    - orm code results in spaghetti code - always
    complete unrealistic and false assumptions

    • @youtubeenjoyer1743
      @youtubeenjoyer1743 9 месяцев назад

      Show me a single example of a non-trivial application where the third point is not true. Protip: you can't. The first and second points are completely arbitrary.

    • @FooCo2009
      @FooCo2009 9 месяцев назад

      @@youtubeenjoyer1743 its not on me to disproof the assumption. you need to show why the statement is valid not only based on your own code quality.

  • @AlexandruBusuioc
    @AlexandruBusuioc 2 года назад +22

    You would never use an ORM... in JavaScript? Why are you using JavaScript for backend anyway?

    • @masadamsahid
      @masadamsahid 2 года назад

      May be because he found the Fastify framework? Idk

  • @JagdeepSinghKalsi
    @JagdeepSinghKalsi 2 года назад +3

    Did not expect such a video on JetbrainsTV.
    Have high expectations. Got a bad idea implemented in probably the worst possible manner.
    This was a promotional content, at best.
    TBH, I am short on words to express the concerns and disappointments that I have from this video.

  • @jovincebrillantes1042
    @jovincebrillantes1042 2 года назад +16

    Laravel's ORM is pretty sick though

    • @yungifez
      @yungifez 2 года назад +7

      Thank youuu
      Eloquent is too good

  • @lamka02sk
    @lamka02sk 2 года назад +42

    For me at least, the main advantage of using ORM is that the data you work with has a fixed structure. This is very useful especially on huge projects where there is no chance of remembering all of the data structures. It is probably not a problem in statically typed languages, but for example in PHP, ORM helps you not waste time searching for what properties arrays contain.
    Another useful thing is abstraction on top of your database. Yes, you can use views, but they are not a perfect solution for everything, especially if they call procedures. Databases are a hell to debug.

    • @ToTheMoonParty
      @ToTheMoonParty 2 года назад +4

      There's no such thing as fixed structure in software. Goodluck.

    • @Frozander
      @Frozander 2 года назад +14

      @@ToTheMoonParty "Say random incorrect thing. Goodluck."

  • @maksymkhartanovych2754
    @maksymkhartanovych2754 2 года назад +26

    Not all ORMs are anti pattern :) Modern Data mapper ORMs are live well together with DDD and CQRS/ES and help you model your domain as plain objects by decoupling the mapping and persistence logic to infra/framework config level

    • @maksymkhartanovych2754
      @maksymkhartanovych2754 2 года назад +3

      and for read models (projections) you’re able to use any suitable for you storage and tools to represent your data to the client. You don’t need any ORMs at all for this.

    • @youtubeenjoyer1743
      @youtubeenjoyer1743 Год назад

      DDD is an anti-pattern as well.

    • @sachaDS0
      @sachaDS0 9 месяцев назад

      @@youtubeenjoyer1743?! How so can you elaborate?

    • @youtubeenjoyer1743
      @youtubeenjoyer1743 9 месяцев назад

      ​@@sachaDS0 It's premature abstraction and overengineering for nothing. Write your script and go do something else. You don't need 7 additional layers of abstraction to parse an http request, select a few rows from the database, run a few if statements, and return an http response.

  • @esra_erimez
    @esra_erimez 2 года назад +11

    ORM came out of a long time of searching for solutions to the Object to Database problem. There were many solutions proposed. Some include things like "Pointer swizzling", "Texas: An efficient, portable persistent store", "InterSystems Caché" just to name a few. Over time, ORM won out. I think a salient point that is left out of conversations criticizing ORM is that is not necessarily a one to one mapping of classes to tables. ORM can represent all relational model entities such as views and stored procedures. ORM gives a convenient entry to the relational model.

    • @8forty
      @8forty 2 года назад +1

      You're right, ORM "won out" and was generally better for many than those other solutions, but that was a LONG time ago and I'd argue that ORM is not aging well, it's definitely time to be exploring new ideas.

    • @esra_erimez
      @esra_erimez 2 года назад +1

      @@8forty Agreed, we should always keep a look out for better solutions. Interestingly, the authors of PHP and Go tend to shun frameworks all together.

  • @queiroz-rafael
    @queiroz-rafael Год назад +1

    yes, me too. Important to know them for enhancing existing apps that already use it. But my own projects - no ORM: lighter and faster. Who understands SQL and DAO pattern may build clean solutions. That is my POV.

  • @Simvetanylen
    @Simvetanylen 2 года назад +23

    If your ORM code looks like spaghetti, it is because your database looks like spaghetti.

  • @floooobzdagget3734
    @floooobzdagget3734 2 года назад +4

    Sorry, dude! CTO/Architect/Developer for over 30 years. You are wrong.

  • @GolderiQ
    @GolderiQ 2 года назад +7

    I was actually agree with him on the problem, but then he shows his solution and lost me. I mean did he heard about postgREST, which create a REST API on top of your tables, or Supabase an open source alternative to Firebase that leverage postgREST, GraphQL, and many other tools to go even further?

  • @Wfmike
    @Wfmike 2 года назад +6

    Orm is helpful especially in domain driven design. Also criticising orm due to optimization while using nodejs in backend is slightly ironic.

    • @MrHamsterbacke756
      @MrHamsterbacke756 2 года назад

      Nodejs ist pretty fast

    • @heroe1486
      @heroe1486 Год назад

      @@MrHamsterbacke756 node is kinda fast, not the amateurish ecosystem where each library import "is-odd" from npm. There's no point on having a relatively fast language if you can't do anything without third party dependencies and if those are generally not that good/fast.

  • @pm71241
    @pm71241 2 года назад +6

    I'm absolutely not a fan of ORMs.
    Setting aside that I once wasted a lot of time on the futile task of generalizing storing objects in relational databases, I'd still recommend heavily against using them.
    You're talking to a relational database (in the common case) and you need to understand how it works, so you need to be able to reason about SQL anyway. Once you can that, you can reason about most SQL.
    ORMs have the same issues as using too much syntactic sugar. It hides complexity you need to understand anyway and thus makes it a lot harder to reason about it when the underlying reality peaks through (and it will). On top of that it also takes away your ability to reason about the SQL for code new to you, since the way the ORM api works and hides the SQL is different from language to language and ORM library to ORM library.
    So when I, say, am thrown into a PHP code base using "Parable", it doesn't help me much understand it that I'm perfectly fluent in MySQL or some other ORM.
    Don't use ORMs. ... learn SQL instead.

    • @adhi_atma
      @adhi_atma 2 года назад +1

      Seems like we are minority in here.

    • @rayvid7979
      @rayvid7979 Год назад

      Agree... ORM is catastrophic to many software projects...

    • @Peter-bg1ku
      @Peter-bg1ku 11 месяцев назад +1

      @@rayvid7979 I disagree. They a useful for the boring crud stuff but they fall short when queried data becomes complex.

  • @esra_erimez
    @esra_erimez 2 года назад +17

    Another point I'd like to make is that JavaScript originally started life as a scripting language to facilitate the manipulation of a browser. And, now we're writing server backends in it.

    • @xIcarus227
      @xIcarus227 Год назад

      @Master & Commander couldn't have said it better myself. I work full stack and frontend is genuinely my least favourite part exactly because of JS. At least the ecosystem has nice libraries and frameworks to help alleviate some of those woes.

  • @_pvn
    @_pvn Год назад +1

    This was a good watch, thank you !

  • @michaelbitzer7295
    @michaelbitzer7295 2 года назад +3

    Been using EdgeDB to avoid orms and it is such a joy to work with.

    • @aldogutierrez8240
      @aldogutierrez8240 2 года назад

      Thanks for the info. However, no java client for the moment

  • @8forty
    @8forty 2 года назад +14

    I'm not a fan of JS, but I have a long history of using ORMs in production C++, Java, python. Your criticisms of typical ORM frameworks are spot-on in my experience, everyone should spend serious time thinking about your 80/20 diagram: it's crazy that so many devs focus on the 20%-effort/repetitive tasks and commit to the eternal grind of suffering through the disadvantages of whatever framework they've chosen for the 80%-effort/complex parts -- those parts are EXACTLY where I wish I had a framework to help, and your ideas are very interesting. (Also LOL at the hibernate joke, and some of other comments here, watching your core ideas zoom miles over their heads)

    • @aphluent
      @aphluent 2 года назад

      Bruh, your'e not as smart as you think you are.

    • @8forty
      @8forty 2 года назад

      @@aphluent irony!

  • @ylioo
    @ylioo 2 года назад +3

    The is the first video from JetBrainsTV and IntelliJ IDEA by JetBrains channels that I ever downvoted. Please don't invite this person anymore. 90% of all top comments are more or less about how "bad" he is.

  • @jessejoseph2643
    @jessejoseph2643 Год назад

    I"m really glad this video is titled "I would never...". For me, I would always use an ORM in every project. Asides the fact that writing raw SQL might be a bit of a hassle, having to maintain a language that is completely different from the rest of your codebase might be counter productive. It's why hybrid frameworks like React Native and Flutter were built. Sometimes, software development is not just about how fast the individual technologies you are using are, it's about how well you can architect your system to get the best performance out of all the individual technologies.

  • @Pesthuf
    @Pesthuf 2 года назад +2

    I feel like every time people complain about ORMs, they complain about active record ORMs and others where the model classes are bloated spaghetti tightly coupled to the DB.
    And even if not, there's usually complaints about n+1 queries, as if every competent ORM didn't have multiple ways to stop that.
    Or deliberate ignorance to the fact that you can still make complex queries by writing SQL when it makes sense to.
    The only SQL I saw in this presentation was some DDL to create migrations. All the actual queries were handled by some magic transformation thingy, more magical than any ORM I've ever seen. How would you actually run your own complex SQL query? How do you handle a more complex update case where you need to query data, then patch part of it from user input and part of it from some other source? How do you do all of that transactional? Locking, optimistic and pessimistic?
    In my experience, logging becomes ugly when you're never sure which fields of your entity were actually pulled from the database. It's also bad when you query some related data that you happened to have already queried earlier and changed, but haven't commit _yet_; An ORM, it will know that the entities were already hydrated and return references to your existing, updated entities (unless you explicitly want it not to); some self-written SQL repository will give you what's in the DB right now, so now you get to deal with inconsistent data. Dirty reads aren't a feature, but a bug.

  • @hamidrez2269
    @hamidrez2269 2 года назад +1

    To me it looks like he just wrote a clickbait title ,to introduce his own framework while only talking about orm cons to make it look legit

  • @pperez1224
    @pperez1224 2 года назад +13

    I would never use JS for back-end development , before discussing about using ORM or not. ORM is about abstraction , something only understood by genuine engineers. If you had working on a product having to suppport multiple database , you would have been happy to have an ORM between your code and multiple version of multiple vendor databases .
    Its also a way to control code quality ; spring repository enforce good practice that SQL in the wild can't . Yes ORM has limitation , but pros know when to use / not to use it The CRUD use case is the best for ORMS

    • @fabionunes2793
      @fabionunes2793 2 года назад +2

      You forced a little bit with the "real engineers" and abstractions. Talk with Linus Torvalds about abstractions... Tip, he is an engineer.

    • @ComputationalArt
      @ComputationalArt 2 года назад +1

      me too, the problem is JS not ORM

    • @fabionunes2793
      @fabionunes2793 2 года назад +5

      @@ComputationalArt why JS is a problem? Node, browsers, they are just runtimes providing a way to interpret some scripts written in a simple grammar. JS is not a problem, the problem is you that can't understand the JS grammar. The same is with Java or other language, they aren't the problem, people needs to understand the grammar, the purpose of the language.

    • @ComputationalArt
      @ComputationalArt 2 года назад +3

      ​@@fabionunes2793 I used NodeJS for 5 years(It's good), very easy is for small project, I suggest to try Go or Rust, It's another world man ;)

    • @fabionunes2793
      @fabionunes2793 2 года назад +3

      @@ComputationalArt hey, I know golang and rust. To be honest with I, they are way much better than JS in all sort ways, starting from the linearity in the grammar system, I mean, no babel, no conflicting module system, type safe... But, I have a huuuuuge experience with node, so, I can get better paying jobs in node for now. And I'm on a moment where I want tp achieve some personal/money involved goals hahaha.

  • @fabionunes2793
    @fabionunes2793 2 года назад +2

    The guy starts the video showing an active record model as it is the only pattern. If you don't want your model to know so much, just use a Data Mapper. Basically you model is a representation of a tuple, a type. Can be in js, ts, java... Whatever. Collections are going to hold the... Collection of tuples. It's trivial. It's scalable, once you need to think about how you are going to avoid in all terms hitting the database whenever it's unnecessary. For a data mapper, you can have a class to manage entities and connect them to the database manager and.. the types (which are basically, the entities, or the models). And you can use a query to fetch data and turn into these objects and return to whatever thing is asking for it. IDK why people over complicate this simple thing.

  • @bakerkawesa
    @bakerkawesa 2 года назад +1

    I grew out of ORM and other indirections years ago. I like simplicity.

  • @jesseokeya
    @jesseokeya 2 года назад +4

    I don’t necessarily agree with this. There are some use cases where ORMs work perfectly. Although some useful points were made agains ORMs this is mostly a Platformatic sales pitch imo

  • @mstarlingc
    @mstarlingc 2 года назад +3

    Find this is not true when using DB First, if you scaffold the database you avoid most of the typing. I guess is his personal opinion.

  • @allannielsen4752
    @allannielsen4752 2 года назад +3

    Platformatic = ORM + Code generator.... I don't see the difference.

  • @Verrisin
    @Verrisin 2 года назад +1

    He's confusing general ORM with one instance of it he didn't like...

  • @dmitriyobidin6049
    @dmitriyobidin6049 2 года назад +4

    2k models not bad enough. 3k microservices - shut up and take my money.

  • @aovchinn
    @aovchinn Год назад +1

    did I just watched an ad ?

  • @MH-oc4de
    @MH-oc4de Год назад

    I develop python codes around a large, fixed db schema. SQLAlchemy has made development and maintenance much easier. However, there are definitely performance issues for even a moderately sized database; it takes a long time to create all of the objects in memory. I don't think the solution is to ditch the ORM idea - it is a boon for development - but rather to figure out how to (greatly) improve performance.

  • @schlappinauskas
    @schlappinauskas 2 года назад +16

    So, basically you wrote an unmature version of Django in JS. Congratulations on this. I always wondered when JS would catch up on these 15-year-old ideas. Interesting to see, but neither new nor revolutionary I'm afraid.

    • @BistaNadig
      @BistaNadig Год назад

      Your argument is assuming django is any good. Sure, js on server sucks, but python is not too far behind..

  • @whchi9252
    @whchi9252 2 года назад +1

    I will treate ORM as infrastructure layer in DDD, which makes great separation of concerns.

  • @jpboy1962
    @jpboy1962 2 года назад +1

    "Models represents a row in a database", Wrong, that would be a ROM. ORM takes an object model and uses a relational database for persistence. When using an ORM your thought process should be evolve to "Database? Isn't that where I store my objects?"

  • @ComputationalArt
    @ComputationalArt 2 года назад +3

    It seems exaggerated to me, ORM is not that bad, maybe Javascript is the problem :)

  • @minercreepmc
    @minercreepmc 2 года назад +2

    Focus on domain problem, when i use SQL i start to concern about all those SQL stuff, it too low level for me, the code seem ugly, why i need to concern about return value is a collection of rows, it can't be lint since it live inside TS/JS file, also you can write reusable class with ORM, data mapper, seperate between domain class and database entity class.

  • @teenspirit1
    @teenspirit1 2 года назад +1

    Models are database tables. So soon you will have 2000 models: well, duh! If you have 2000 tables, you have 2000 models. My guy has no point at all.

  • @EdwardChapman99
    @EdwardChapman99 День назад

    How did this get on to the JetBrains channel?!

  • @humanardaki7911
    @humanardaki7911 Год назад +1

    over exaggerate and underestimate, what else can i expect from a life dedicated serious nodejs developer, i accept that i'm an average programmer, but i wouldn't buy that tons of brilliant minds before me did it wrong to be corrected in 24 minutes through another js framework ending with "-fiy" creator...

  • @CaleMcCollough
    @CaleMcCollough Год назад

    I love this guy's accent.

  • @TheMixtapeArchive
    @TheMixtapeArchive Год назад

    As Ted Neward said, ORM is the Vietnam of computer science. :)

  • @youngwt1
    @youngwt1 2 года назад +1

    I could only make it half way through this video, i don’t know how in good faith this guy can claim a model is also a repository and business logic? Also claims ORM is spaghetti code then uses npm?!?!???

  • @danilo2735
    @danilo2735 Год назад

    Orm makes the easy tasks easier and the hard tasks harder.

  • @Peter-bg1ku
    @Peter-bg1ku 11 месяцев назад

    All the DDL code you keep editing can be generated by a simple String property in an ORM. You seem to enjoy typing more than solving problems.

  • @fabionunes2793
    @fabionunes2793 2 года назад

    Now I'm on the microservice part .. the silver bullet... If don't even have a product, why did you want to optimize it?

  • @AssaneMbengue
    @AssaneMbengue 2 года назад +1

    He said " Objet oriented mapping ", seriously ?

  • @jeffg4686
    @jeffg4686 2 года назад +1

    "it hibernates" ... not bad

  • @msdevel
    @msdevel 2 года назад +2

    You're using JS on the backend and swearing at ORM. You must have gone crazy.

  • @BistaNadig
    @BistaNadig Год назад

    But ORMs are the only way a "senior framework developer" can write sql. :(

  • @RagdollRocket
    @RagdollRocket 2 года назад

    using npm while talking about introducing complexity using ORM (I agree 100% btw.) seems weird.

  • @Fanatic17
    @Fanatic17 2 года назад

    Love this stuff Matteo ❤

  • @sirajmussafirr147
    @sirajmussafirr147 Год назад

    Status Check:
    Is he still staying strong on his choice of not to use an orm anymore in his life?

  • @rainhardvidiansyah6968
    @rainhardvidiansyah6968 2 года назад

    Jpa hibernate saves my whole life 😂😂😂

  • @jimiscott
    @jimiscott 2 года назад +1

    Putting it out there, but graphql is horrible and mutations are more horrible again.

  • @VinyasMalagaudanavar
    @VinyasMalagaudanavar Год назад

    So we should write SQL for everything?

    • @Lexaire
      @Lexaire 9 месяцев назад

      No, you should write SQL for migrations, then use his codegen project to convert them to models, then pretend there are no models.

  • @i_youtube_
    @i_youtube_ 2 года назад

    I want to learn concepts on building an ORM. What are these concepts?

  • @khoadodang4284
    @khoadodang4284 2 года назад

    is there anyone know what chrome extension he is using for randomizing color palette (on his new chrome tab)?

  • @WayneMunro
    @WayneMunro 2 года назад

    Try Object Role Modeling. Many things can be derived from a well thought out model of the facts at hand.

  • @OsamaBashir93
    @OsamaBashir93 2 года назад

    Nice!

  • @tylerlwsmith
    @tylerlwsmith 3 месяца назад

    How is this not an ORM?

  • @ianglez13
    @ianglez13 Год назад

    This type of content regarding being against "x" technology confuses those of us who are learning a lot, you no longer know if the paradigm you are studying is correct, if it is correct or not to use certain resources.
    So what the hell do you recommend to those of us who are just starting out?

    • @heroe1486
      @heroe1486 Год назад

      That you don't listen to RUclipsrs and such too much, those are willing to make you consume content, and how they fo that ? By having polarizing opinions and changing opinions every 2 months so they can feed you something new.
      Stick to serious people, read official docs, quality blog articles etc.
      And basically everything popular is more or less "correct", it's just a question of use cases as always, search for those.
      Also start with the basics and then tackle abstractions, like learning JS before React or here at least basic SQL before ORMs.

  • @StayAware9
    @StayAware9 2 года назад

    Hibernate cried after watching this videom

  • @freecodyx
    @freecodyx 2 года назад

    Sql should part of a language structure or an extension

  • @SXsoft99
    @SXsoft99 2 года назад

    i ussualy add one ore more layers between my model and controller
    like an repository that i initialize in my controllers. In my repository classes i interact with my models and write my business logic, that after i altered i serve to my controller for a resonse.
    but here you should also talk about the type of ORM, is it activerecord vs datamapper since the way you type of ORM dictates the way you write your data access layer

  • @timglabisch6767
    @timglabisch6767 2 года назад +3

    lol. this is just a poor mans orm over http.

  • @Hugo.Digital
    @Hugo.Digital 2 года назад

    Never say Never.

  • @meceffeukada3767
    @meceffeukada3767 2 года назад +1

    The arguments are so so bias and inconvenient.

  • @Flexximilian
    @Flexximilian Год назад

    That Pareto principle graphic sucks, man. So the 20% are *part* of the 80% on either side? LOL. Never mind the sizes aren't quite correct. But this was just made using excalidraw, clearly. So oh well. Still, at least let's keep the crazy principle that the whole is 100% ok? If you mean to label the difference / remainder of the 100% circle, then don't center the 80% labels, but them off-center and make them the same size as the 20% ones. Also then, the top arrow needs to start within the circle , and the lower one needs to end within the circle instead of from/to the edge, which represents 100%, or "the whole". This graphic really says: "All outcomes result from 20% of causes, while 20% of outcomes result from all causes".
    To make things worse, "Causes" was replaced with "Features" and "Outcome" with "Effort". That doesn't quite figure, does it? Effort does not "result from" Features, to use the language of the first graphic. It's the other way arround. Features are the result of Effort. And the Pareto Principle says that 20% of the features take 80% of the effort to produce, or in other words "getting things started is hard".
    If you look at modern software, then 80% (easily) of the actually executed machine code, and some 99% of the build tools to produce it (the 1% being project-specific tooling like custom code generation and custom configuration), are libraries and frameworks, with ORM being a typical part of that mix. 20% of the code is what we then call "application code". it's quite easy to see that *way* more time went into the development of those frameworks in total (often person-decades of work), than into the application code. If an application took two years to produce, it'll use libraries that took 8 years to produce. What those libraries do are "features" of the product, in Pareto's principle.

  • @FabioMaulo
    @FabioMaulo 2 года назад

    Pere con le noci. Un ORM solo si occupa della persistenza e gli oggetti non sono row del DB di fatto il "Mapping" si occupa esattamente di trasformare file e colonne in grafi. Puoi usare ORM ed aavere una struttura basata in features e/o microservices con widespread persistences... e lo dico perché sono 15 anni che le cose che faccio funzionano cosí. Comunque opinioni sono opinioni, l'importante é non crederci troppo a quello che si dice.

  • @tonitabak
    @tonitabak 2 года назад

    Love it

  • @maulanaiman4448
    @maulanaiman4448 2 года назад +2

    I would never use a javascript, how about that ?

    • @0shakti0
      @0shakti0 2 года назад +2

      Good luck with that

    • @leularia
      @leularia 2 года назад

      @@0shakti0 hhhhhh

    • @astroid-ws4py
      @astroid-ws4py 2 года назад

      WebAssembly comes soon, Haskell compiler integrated support to it today, And more and more languages are coming.

    • @Frozander
      @Frozander 2 года назад

      @@astroid-ws4py It is already here, what exactly do you mean by it coming soon? which new feature to WA is coming soon. From my experience, apart from some browser based photo editors or 3d apps etc. nothing really uses it.

    • @raphaelgorbach1476
      @raphaelgorbach1476 2 года назад

      WebAssembly isn't replacing JS for frontend dev anytime soon lmao, this is similiar to people coping about how php is dead.

  • @basheeral-momani2032
    @basheeral-momani2032 2 года назад

    how this is diff from Yahoo Elide?

  • @bakrmasaeed7777
    @bakrmasaeed7777 Год назад

    🎯 Key Takeaways for quick navigation:
    00:05 🗣️ Matteo Collina introduces the topic of Open Data Oriented Mapping (ODM) and expresses his enthusiasm for it.
    01:09 📦 Object-Relational Mapping (ORM) models often lead to fat objects with multiple responsibilities, causing code complexity and unscalable architecture.
    03:00 🍝 ORM usage can result in spaghetti code, making it challenging to manage complex codebases, especially when dealing with numerous models.
    05:53 🧩 Matteo discusses the Pareto Principle and suggests that choosing a technology should optimize for handling the 20% of features that take 80% of the time.
    10:40 🚀 Matteo introduces Platformatica, a web framework that offers flexibility, extensibility, and the ability to reduce repetitive tasks while still allowing for customization.
    Made with HARPA AI

  • @MsVsmaster
    @MsVsmaster 2 года назад

    I read a lot of “the problem is JS in backend and not ORM”. Could you guys elaborate more about it? It’s scaling problem, not clustering properly or what I’m missing here?

    • @midoevil7
      @midoevil7 2 года назад +1

      AFAIK , JS can be a nightmare generally for devs who are used to mature and typed languages.
      It is hard to scale JS code base per service, poor refactoring tools, poor code tracing tools, typed languages removes entire class of errors related to wrong types at runtime.
      And I believe the ecosystem generally shifts too quickly and not reliable enough, compare to things like java and C# at least, where you can have a code base that is 8 yrs old and its framework/tools are still supported.

    • @heroe1486
      @heroe1486 Год назад

      Both aren't that related (except that since node hasn't a mature ecosystem most ORMs are average at best, they had to wait a slow Prisma to have a "standard"), it's just that you can't really brag about "details" when your whole backend is based JS

  • @mirza4160
    @mirza4160 2 года назад +1

    Can you mark this video as an #ad for platformatic? There is no useful information beyond that. Very clickbaity.

  • @ramabookstroremalang9131
    @ramabookstroremalang9131 2 года назад +2

    I'm jpa hibernate lover 😍

    • @hardcorecode
      @hardcorecode 2 года назад +2

      I second that! I think he needs to try JPA and he will rethink his position

  • @khangtran1828
    @khangtran1828 2 года назад +2

    Has this guy ever worked on a real project? 😂

  • @bezimienny5149
    @bezimienny5149 2 года назад +2

    I wasted 25 minutes of my life

  • @sortof3337
    @sortof3337 Год назад

    Just putting it out there, Pareto principle is not a fact at all, its very circumstantial and not very reliable when put throught rigor. And optimizations based on this will suffer the same fate. Its' time we stop using shitty examples and spreading misinformation based on hearsay.

  • @tempusmagia486
    @tempusmagia486 2 года назад +1

    This is one of the worst videos Jetbrains has released for sure

  • @anonymologist7946
    @anonymologist7946 2 года назад

    I don’t see why so many people say that js is slow in backend. Most of the time the slowness results from the one who writes codes, not the language itself. In fact, considering io bound nature of most web applications and the v8 engine, js can have performance roughly equal with or even better than compiled languages like C++.

    • @heroe1486
      @heroe1486 Год назад +1

      Because when you import low quality librairies it doesn't matter, and since node isn't go where you can develop almost anything without third party dependencies voilà, the language speed doesn't matter that much.

  • @romanmunar
    @romanmunar Год назад

    🤦 comments aren't shipping any software any time soon. ux demands are at all time high right now. you can't spend too much time on mundane tasks. orms offer better dx for doing the those tasks and ensuring everything is well buckled so that if things will break, they break before deployment and not test before things break. < i smell gaslighting on the latter. we can't rely on code reviews alone for catching every case there is nor should we be able to cover all test cases. *defense programming creeps in here*
    example story. if you're a guest, only show 3 post previews of someone's profile. in this example, if you hand-coded your authz rules in sql, not only are you leaking your business logic in your data server, changes will not break even they should be. IME best to avoid hard-set rules and you want to put them in a single place so changes are safer to do.

  • @vietanhtruong7344
    @vietanhtruong7344 2 года назад

    100% agreed

  • @michaelbitzer7295
    @michaelbitzer7295 2 года назад

    For the people complaining about him using JS for the backend, this is a JS talk.

    • @heroe1486
      @heroe1486 Год назад

      Well he isn't there by chance I guess

  • @blankcheckguy69
    @blankcheckguy69 2 года назад

    prisma tho

  • @kirillgimranov4943
    @kirillgimranov4943 2 года назад +3

    Who even asked ur unrelated opinion?

    • @leularia
      @leularia 2 года назад

      who invited you again ? 😅😅

    • @kirillgimranov4943
      @kirillgimranov4943 2 года назад

      @@leularia I have no idea, but it's a fact that I don't have a clue who u r and who invited u here too
      At this point I don't wanna the answer as well as answers on questions unrelated to my topic question
      If u got nothing to say else - stfu and leave it to the ones who can, even tho I bet there's no one that can give relevante answer

    • @leularia
      @leularia 2 года назад

      @@kirillgimranov4943 just throw jargon's cause you have no idea about any thing, throwing your imposture at us lol you stfu

    • @kirillgimranov4943
      @kirillgimranov4943 2 года назад

      @@leularia r u outta ur mind?
      Firstable, ORMs are highly useful, but in some cases. In others they ofc aren't. This channel auditory that is interns need to use it cause they gotta create casual cases
      Secondable, this channel of dumb products can't get an attention with anything else instead of bating with such clickbait sht, pathetic

    • @leularia
      @leularia 2 года назад

      @@kirillgimranov4943 man i actually don't know the channel and am not supporter of his concept, am just here for the fun and you can't handle humor...

  • @XY-ds6ej
    @XY-ds6ej 2 года назад

    Without react, nobody would use JS to build a complete websites. And why Facbook JS use should be clear. The users is totally transparent. Every mousemove and so on is detected and can be used for very bad things! Not nice, not good. JS was long time known as a bad ass, react and all the reactive frameworks did simply "green" washing JS ;-)

    • @witchedwiz
      @witchedwiz 2 года назад +1

      I mean...
      I love angular and i strongly prefer it to react.... :X

    • @hardcorecode
      @hardcorecode 2 года назад

      @@witchedwiz NextJs is way better, angular has no fragments and is frontend ONLY last time I checked.

  • @fdov4
    @fdov4 Год назад

    Actually I would prefer using ORMs over the microservice architecture (and orchestration) madness that comes with it.

  • @nonequivalence1864
    @nonequivalence1864 2 года назад +1

    This is technological propaganda in its finest form, these people seriously don't know what they're talking about. Why would you not use an ORM, which, typically, handles malicious attacks like SQL injections under the hood? Why would you manually handle stuff like that instead of using an ORM? Why would you write raw SQL queries when using an ORM is more secure? JetBrainsTV, if you're reading this, it's best to take this video down. You're spreading dangerous misinformation. What a shame.

  • @georaves2998
    @georaves2998 2 года назад

    English isn't your first language right?