Encore.ts - 9x faster than Express.js (feature comparison and migration guide)

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

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

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh หลายเดือนก่อน +2

    looks incredibly nice, migth try it out even today for a small graphql api

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Cool! You can check out our GraphQL tutorial here: encore.dev/docs/tutorials/graphql
      Be sure to join our Discord community if you have any questions: encore.dev/discord

  • @chiebidoluchinaemerem5860
    @chiebidoluchinaemerem5860 หลายเดือนก่อน +1

    Gosh this is crazy 😱
    I am really stunned and wonder how long it took the team to build this great project

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Thank you! The project started 7 years ago and the first version for Go has been used in production for about 4 years. We released Encore.ts a few months ago. You can check out the OpenSource repo on GitHub: github.com/encoredev/encore

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Thank you! The project started 7 years and the first version for Go has been used in production for about 4 years. We released Encore.ts a few months ago.

  • @robert-m6u7d
    @robert-m6u7d หลายเดือนก่อน +1

    Seems like a nice project to follow. Great job!

  • @BlurryBit
    @BlurryBit หลายเดือนก่อน +5

    This looks pretty dope!

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

    This looks promising. I will definitely try it.

  • @beratsulimani9823
    @beratsulimani9823 หลายเดือนก่อน +4

    Amazing, great job 😇

  • @bryson2662
    @bryson2662 หลายเดือนก่อน +1

    I'm excited to try this but I don't want to create an account. It seems there is an option to use app create without an account but I followed the instructions in the video and encore app init won't let me continue without logging in/creating an account. What's up?

    • @encoredev
      @encoredev  หลายเดือนก่อน +2

      Thanks for reporting! This is now fixed in v1.41.7 so you no longer need an account to run `encore app init`. You can upgrade using `encore version update` to get the latest CLI version.

  • @franklinantony
    @franklinantony หลายเดือนก่อน +3

    Is it compatible with NestJs?

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Yes, here's a how to guide: encore.dev/docs/ts/how-to/nestjs

  • @leocaesar2
    @leocaesar2 หลายเดือนก่อน +3

    How do i use ORM with encore?

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

      We're working on publishing some tutorials. In the meantime, here's an example app showing how to use Sequelize with Encore.ts github.com/encoredev/examples/tree/main/ts/sequelize

  • @praweewongsa
    @praweewongsa หลายเดือนก่อน +4

    good job

  • @zuzukouzina-original
    @zuzukouzina-original หลายเดือนก่อน

    ExpressJS served us well. btw, what is fast nowadays, it’s not like you build the next facebook for the most 😉

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Good for you! Obviously a lot of people are using Express and are ok with it. Whether or not performance is important depends on your use case. If you're building a tiny hobby project, it's largely academic. But if you're shipping a production backend to the cloud, it can have a pretty large impact.
      Lower latency has a direct impact on user experience. To state the obvious: A faster backend means a snappier frontend, which means happier users.

  • @maxkabechani
    @maxkabechani หลายเดือนก่อน +4

    Need a tutorial with session auth

    • @dummymail2495
      @dummymail2495 หลายเดือนก่อน +3

      Yes please

    • @encoredev
      @encoredev  หลายเดือนก่อน +2

      Great suggestion!

  • @kilo.ironblossom
    @kilo.ironblossom หลายเดือนก่อน

    How is speed compared to Elysia? My Elysia DX coming from express was day and night. There's no going back ...

    • @kilo.ironblossom
      @kilo.ironblossom หลายเดือนก่อน +2

      ...why most of the frontend meta Framework's name starts with N, and for the backend with E ? 🤔

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

      Would be interesting to do a comparison with Elysia, thanks for the suggestion!
      Here is a comparison with Fastify v5 that got released last week (Encore.ts is about twice as fast): encore.dev/blog/fastify-v5
      Our comparison includes request type validation, that is probably why the numbers differ a lot from the numbers on elysiajs.com.

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

      It's 3x faster than Elysia when using type validation, check out the updated benchmark article (benchmark code linked from article): encore.dev/blog/event-loops

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

    How to build encore follow clean architecture ?
    With nest.js easy to setup because core of nest.js follow dependency injection.

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

      Encore makes it simple to separate concerns by using multiple sub-systems and services using the API framework, and it provides observability and documentation out of the box so all service-to-service calls are clearly visible thanks to both tracing and automatic architecture diagrams. It also ensures the application logic is independent of specific infrastructure services using the cloud-provider independent infrastructure declarations in the framework.
      Here's an example app consisting of a few different services: github.com/encoredev/examples/tree/main/ts/uptime

    • @SimonEncore
      @SimonEncore หลายเดือนก่อน +2

      As I mention in the video, Encore.ts is unopinionated when it comes to how you structure your code. You can follow the SOLID principles in your business logic if you like, Encore.ts will not stop you.

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

      @@SimonEncore Thanks for update, So with any libary on npm, pnpm can run on Express will run correctly on Encore ?

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

      @@minhhieple6483 No, not necessarily. As shown in the video, you can not just swap out Encore.ts for Express and most middleware created for Express will not work out of the box for Encore.ts. Is there a particular library that you are thinking about using together with Encore.ts?

  • @Dino-qz9bt
    @Dino-qz9bt หลายเดือนก่อน +4

    What about vs Hono

    • @encoredev
      @encoredev  หลายเดือนก่อน +2

      Great suggestion, we'll look into producing a benchmark vs Hono :)

    • @vladyslavprus9387
      @vladyslavprus9387 หลายเดือนก่อน +1

      @@encoredev seen elysiaJS benchmark result been 5-6 times faster then yours, wonder if its true

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      @@vladyslavprus9387 We've not seen an Encore vs elysia benchmark published anywhere, care to share a link?

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Our comparison includes request type validation, that could be why the numbers differ a lot from the numbers on elysiajs.com.

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

      Update: Encore.ts is 3x faster than Hono with schema validation, and 70% faster without schema validation. See x.com/encoredotdev/status/1839668756878184810

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

    But is it faster than hono?

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

      Encore.ts is 3x faster than Hono and Elysia with schema validation enabled, and 70% faster without. See x.com/encoredotdev/status/1839668756878184810

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

      Yes. 3x faster when using type validation, check out the updated benchmark article (benchmark code linked from article): encore.dev/blog/event-loops

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

    Is it faster than hono.js

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

      Update: Encore.ts is 3x faster than Hono with schema validation, and 70% faster without schema validation. See x.com/encoredotdev/status/1839668756878184810

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

      Yes. 3x faster when using type validation, check out the updated benchmark article (benchmark code linked from article): encore.dev/blog/event-loops

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

    Supabase compatibility so necessary for Encore

    • @encoredev
      @encoredev  หลายเดือนก่อน +1

      Encore is compatible with any external database, there's nothing stopping you from using whatever provider you want. Not all the built-in infra related functionality will work out of the box though.

  • @3ladeZ
    @3ladeZ หลายเดือนก่อน

    I think comparing anything with express is pretty meh, compare it with hono speed for example

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

      It's coming!

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

      Encore.ts is 3x faster than Hono and Elysia with schema validation enabled, and 70% faster without. See x.com/encoredotdev/status/1839668756878184810

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

      It's 3x faster than Hono when using type validation, check out the updated benchmark article (benchmark code linked from article): encore.dev/blog/event-loops

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

    Well nice.. but from those numbers I think it's on par with H3 , and u know what uses H3 out of the box ? NUXT JS.
    So in my case why bother splitting the code even more into another api module, when i can keep it inside the main app as a BFF (backend for frontend).
    What I like though about presented Encore is the TS integration and the builtin swagger-panel. HOWEVER, let's be honest .. past the dev phase, dont' think you'll waste time analyzing the data.
    At this point bragging that you made something faster than express.js , should be a standard; not a feature.
    Check any other alternative. They are all at least x5 faster.

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

      It is a fair point that most modern web frameworks will be faster than vanilla Express but Express is still by far the most used web framework for Node.js with it's 32 million weekly downloads. Also, most Node.js devs are familiar with the Express API, that is why we feel that the comparison with Encore.ts makes sense.
      Encore.ts is not for everyone, if you feel like your current setup is working for you then that is great! But if you need to build a scalable, robust application with end-to-end type-safe, we believe Encore.ts is a great choice (we are a bit biased of course).
      In our experience, when having a distributed system with multiple services deployed to the cloud and millions of request per day, having access to tools like metrics and tracing is crucial for quickly finding bugs and bottlenecks.

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

      Update: Encore.ts is 3x faster than Hono and Elysia with schema validation enabled, and 70% faster without. See x.com/encoredotdev/status/1839668756878184810

    • @7iomka
      @7iomka หลายเดือนก่อน

      If nuxt gave the possibility to make auto-documentation of api routers with type-security out of the box with H3, it would be a fairy tale, but as it is, we have to look at the possibility to raise a server separately with less effort but similar metrics.

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

    Comparing perf with grandpa express - weak move. Try compare with elysia or hono.

    • @encoredev
      @encoredev  หลายเดือนก่อน +2

      We sure will. Express is by far the most commonly used framework though, so it seemed relevant to a lot of developers.

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

      Here is a comparison with Fastify v5 that got released last week: encore.dev/blog/fastify-v5
      Encore.ts is about twice as fast.

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

      Here is a comparison with Fastify v5 that got released last week (Encore.ts is about twice as fast): encore.dev/blog/fastify-v5

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

      Update: Encore.ts is 3x faster than Hono and Elysia with schema validation, and 70% faster without schema validation. See x.com/encoredotdev/status/1839668756878184810

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

      We've benchmarked it now, Encore.ts is 3x faster than Elysia and Hono when using type validation: encore.dev/blog/event-loops