Use JavaScript Everywhere

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • A quick look at building Rest APIs with Nest JS and Prisma ORM.
    💬 Topics:
    - Building REST APIs with TypeScript;
    - NestJS Project example;
    - Why use an ORM?
    - Prisma ORM project example;
    - What is Dependency Injection.
    🎈Links:
    - Richardson Maturity Model - martinfowler.c...
    #javascript

ความคิดเห็น • 37

  • @clouds187
    @clouds187 ปีที่แล้ว +7

    With NestJS and Prisma, you can make a Prisma module and decorate it with the @Global() decorator, and then make a Prisma Service that you can inject anywhere :)

  • @Goyo_MGC
    @Goyo_MGC ปีที่แล้ว +6

    Hey, i really like nest and i've used it for production application. However i have my doubt about prisma. Even more recently after the video from codedamn showing a lot of limitation for production. The main problem is that prisma is not a real ORM and have a query engine behind, that makes it really heavy and scale poorly. Great video nonetheless :)

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      Thank you for your feedback and input!

    • @davidhavl
      @davidhavl ปีที่แล้ว +2

      Totally agree about Prisma. MikroORM or even Drizzle do much better job in comparison. Great video though!

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      @@davidhavl Thank you for your feedback! I'll look into those alternatives

    • @oscarljimenez5717
      @oscarljimenez5717 ปีที่แล้ว +3

      The only problem with Prisma is in serverless or edge environment, usually Nestjs is used in statefull environment, so you have nothing to worry about that. The only worry is the same as every other ORM that do multiple queries in some cases.

  • @saramshshrestha7641
    @saramshshrestha7641 ปีที่แล้ว +1

    Fastify and TypeORM for me. Killer combo.

  • @danielkirsch4351
    @danielkirsch4351 8 หลายเดือนก่อน

    Great videos, I’m really enjoying, and learning from them. Could you explain DI a bit more, how it’s implemented in diff frameworks such as Nest and Spring, perhaps in a separate video? Thanks 🙏

    • @danielkirsch4351
      @danielkirsch4351 8 หลายเดือนก่อน

      And the if you could, elaborate on the Module Graph you mention too..

    • @awesome-coding
      @awesome-coding  8 หลายเดือนก่อน

      Thank you for your feedback! Glad you are finding the videos useful.
      Will work on a video explaining some of the important dev concepts we should know, and I'll discuss DI there. Thanks for the suggestion!

  • @nielskersic328
    @nielskersic328 ปีที่แล้ว +2

    I love Nest! It makes it very easy to build large and scalable applications

  • @Xigangxi
    @Xigangxi ปีที่แล้ว

    It kinda makes me feel like Angular... which is something I kinda liked

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      Liked... past tense?

    • @nielskersic328
      @nielskersic328 ปีที่แล้ว

      NestJS was inspired by Angular, so there’s a lot of commonalities

  • @TechBuddy_
    @TechBuddy_ ปีที่แล้ว

    Awesome video but nest is too opinionated for me so I don't really use it. But I have used it in the past and if you are in a team it saves you a lot of mental effort by giving a standard way to write something

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      What's your preferred backend framework?

    • @TechBuddy_
      @TechBuddy_ ปีที่แล้ว +2

      @@awesome-coding previously koa then fastify and now deno with hono js is the best
      Edit: I prefer go fiber over all of them if js is not required btw

  • @rohangodha6725
    @rohangodha6725 ปีที่แล้ว +2

    nest turns js into java (🤮) trpc just seems SO much better for internal apis and graphql for external apis...

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว +1

      I kind of agree with this one :D

    • @gosnooky
      @gosnooky ปีที่แล้ว

      TRPC only works on apps where the front-end and back-end are in the same codebase since they have to share types. It's good for Next and other meta frameworks.

    • @xjdn-34-gdndnk-45-aa
      @xjdn-34-gdndnk-45-aa 2 หลายเดือนก่อน

      @@gosnookymany large projects has the same codebase. In case you need nest Js there is very high chance there would be yarn workspaces lerna, so you shall be writing some shared library across the whole platform. Otherwise no need to bring up this huge enterprise kind of framework to the project

  • @holakonoob
    @holakonoob ปีที่แล้ว

    hay waht ide your using ???

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว +3

      IntelliJ Idea - the new UI.

    • @merotuts9819
      @merotuts9819 ปีที่แล้ว

      ​@awesome-coding does it consume the same resources (RAM, CPU...) as VSCode?

    • @holakonoob
      @holakonoob ปีที่แล้ว

      @@awesome-coding ty

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      @@merotuts9819 Nope :( it's more demanding, but also more powerful than VS Code. (At least in my experience)

    • @TechBuddy_
      @TechBuddy_ ปีที่แล้ว

      @@merotuts9819 It does consume more resources but is worth it for the features. The TS server almost never crashes and the auto complete is un matched. I use vim btw

  • @agcodes
    @agcodes ปีที่แล้ว +2

    I use Nextjs

    • @agcodes
      @agcodes ปีที่แล้ว +3

      wait, i am again the first one to comment 🗿

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      🥳

    • @allan_archie
      @allan_archie ปีที่แล้ว

      I use NuxtJs

  • @merotuts9819
    @merotuts9819 ปีที่แล้ว +2

    Recently learning Nest myself, it feels like Angular in the backend 😅

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว

      I can't decide if that's a good or a bad thing.

    • @davidhavl
      @davidhavl ปีที่แล้ว

      I love NestJS, it's perfect for complex applications. Angular on the other hand,... 🤷‍♂

    • @awesome-coding
      @awesome-coding  ปีที่แล้ว +1

      @@davidhavl I know :)) I posted a video on Angular recently where I expressed some of my thoughts on it, and is the most disliked video on my channel 😅🤦‍♂

    • @davidhavl
      @davidhavl ปีที่แล้ว

      @@awesome-coding Haha, just seen it. So much hate in the comments for no reason 🥺. I actually loved working with Angularjs (v1) back in 2010, created few good sized production apps with it, then after v2.0 I moved to Vue because it was more familiar and in direction I liked.