You Should Drop Express and Try Hono

แชร์
ฝัง

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

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

    I like the way how CJ making up his thoughts & presenting hard topics in an easy interesting way !

  • @steve-adams
    @steve-adams 2 หลายเดือนก่อน +15

    CJ regularly impresses me! Great content, thank you.

  • @smithshaw1151
    @smithshaw1151 28 วันที่ผ่านมา

    CJ embodies the ideal qualities of a developer-gracious, kind, friendly, and an all-around great person. Truly an awesome individual!

    • @syntaxfm
      @syntaxfm  28 วันที่ผ่านมา

      We love CJ.

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

    The ability to work on multiple JS runtimes and various server level architectures, traditional, lambda, workers is really impressive. Also, easy lift and shift to move from Express to Hono is going to make for a great migration story. But when it comes to Greenfield, I really like the DX of tanstack-router. It's file base routing approach and type inference is top notch. It would be awesome to see these two combined

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

      I guess HonoX meta framework is doing something similar and maybe more than tanstack-router.

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

      ​@@amerrashed6287 yeah, I just came across the docs for honoX. Having file based routing will be a big upgrade from regular hono.js. But It will be an addition to and not a replacement for tanstack-router. Most of my projects require a lot of highly interactive UI's. Pretty common in enterprise applications. And seo might be necessary, but as always a minority requirement. Vast majority of the application is behind a login. But if I do need a little bit of SEO, tanstack-start should be able to cover that 🤞
      But when honoX comes out of Alpha, and checks out from our team requirements, I'll push to update our current BE hono api's. At the very least, keep the team cognitive overhead down by having everything on the same pattern of file-based routing

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

    Hono is what made the Express maintainers finally come out of their shells and release an update. If it pushes TS web frameworks forward, I'm all for it. Anything to make Spring Boot and .NET Core apis a thing of the past.

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

      I wanted to like this more 👍👍👍

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

      The bit about it pushing Express release is so not true.

    • @Joshua-dc4un
      @Joshua-dc4un 2 หลายเดือนก่อน

      How do you know that?

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

      @@Joshua-dc4un because I happen to be in these conversations so first hand knowledge that Hono had nothing to do with it.

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

      @@coherentpanda7115 it's not true. Express is a very laid back framework with v5 PR taking 10 years to land. It was in testing forever. They didn't rush anything this year just because hono is catching on. Even if it surpasses express what's the problem for them? It's just open source. There is no revenue loss for them. If anything they will be much relaxed now because the people will raise lesser issues

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

    Awesome video guys! At 20:50, CJ mentioned not needing a build step to use the contracts client side. How exactly would that work in a situation where you have a Hono backend and a React frontend?
    I’d expect the types to be exported to an npm package -> published to the registry -> install in the UI and use contracts accordingly

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

      In a monorepo setup, you can import the type directly from the server package to the client package. For separate repos, yes you'd need some way to get the built server type into the client app. An npm publish is one way to do this, you could also use a github dependency.

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

    Next, I'd love to hear your opinion about Nitro 👀

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

    That intro jingle was dastardly

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

      Lmao had to repeat it a few times to figure out what's going on

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

    Awesome! i would love to see an example of how can i integrate the RPC client outside of a monorepo. for example in a nuxt app.

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

    we request a complete project: "Hono inside of Next.js".

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

      Not sure this is necessary though. Cos literally the hono API CJ built can just be placed inside the API folder in a nextjs app.
      The only thing you'd have to modify is one file and its basically just to hook up the vercel handler

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

      ​​​@@uchennaofoma4624Do know of a repo that has an example of this by any chance? Would love to see it. What do you mean by Vercel handler? Is it all deployed together with a Vercel adapter?

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

    What do u think about elysia js?

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

    What do you think about encore? Isn't it more complete than Hono, Express? I wonder why isn't it more popular. Wish you cover it too.

  • @Richardritchie-w1f
    @Richardritchie-w1f 2 หลายเดือนก่อน +1

    Yo! You have cj on daily basis. Incredible!! I love his videos from 2 years ago and there is a lot of material to learn from him. He is a beast with fancy pedo mustache.. Love him. Syntax you are great bois. You are doing sooo well..

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

    Been a while Wes Bos. Where have you been? You thought me JavaScript object destructuring back in 2016 or there about.

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

    I am big fan of Hono, but what I am worried about is the fact the it’s mostly (from my understanding) developed and maintained by one guy. Similar as Lucia auth. Then one day - bam - guy decided to deprecate Lucia (I am still huge fan of Lucia and the way he decided to sunset it).
    Couldn’t the same thing happen here? Though the main point of this video is for more people to adopt Hono so the chances are lower… but still :D

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

      Yes, yusukebe is the main contributor, but he is employed by Cloudflare and the project is backed by Cloudflare. They have a vested interest in keeping the project going even if for whatever reason yusukebe decides to no longer work on it.

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

      It's a concern, but if it is successful as it seems it is going to be, I imagine eventually the maintainer will bring more people onto the team. I believe Cloudflare is already sponsoring the guy by paying his salary to build the framework? Cloudflare has been pretty aggressive lately getting into Vercel's space, so they might go all in on Honox.

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

      the guy got hired at cloudflare to, what I believe, is to continue working on this, but I do get your point

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

    Hono is really good, but the RPC client is very simple (return object as RpcClient) so I don't consider it typesafe, I think that's the missing component in hono; response validation at client side

  • @saiba-b7l
    @saiba-b7l 2 หลายเดือนก่อน

    i use nest, i mean it's standard js at BE in my country.

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

    The most important thing when choosing a server library to me is how well it integrates with Vite. I always use my web servers to also be my client server in development. Vite integration is a must!!

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

      There is a plugin for that: www.npmjs.com/package/@hono/vite-dev-server

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

    Concerning middlewares I find it difficult to use hono sessions with redis caching. I have been unable to implement this. Please can you do a tutorial on this?

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

      + 1

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

      ​@@pookiepats Why not?
      And is there an alternative?

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

    Ts-rest then we can defer the implementation of server api side.

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

    How does it compare to Fastify?

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

      Fastify has been around longer and is more mature, but in my experience is quite a bit more verbose to get the same level of type safety, validators and tests. They also do not have a built in RPC client like hono, you'd have to use open api and generate the client.

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

    HonoX is pretty nice

  • @Glenn-b2l
    @Glenn-b2l 2 หลายเดือนก่อน +1

    try nitrojs, please ❤

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

    how about Hyper-Express? if we gonna jump ship there'd better be a good reason.

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

      Looks like hyper-express has partial support for existing express middlewares. This is not something you would get with hono. The shift to hono would likely be for new applications you decide to build, not necessarily full express re-writes.
      Also because of the uWebSockets.js dependency, hyper-express only works on top of node. hono is not bound to a single runtime, so depending on your deployment / hosting needs, hono might be a better fit.

  • @4v4
    @4v4 2 หลายเดือนก่อน

    is cj the creator of hono?

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

      No, the creator is Yusuke Wada, he works at Cloudflare - x.com/yusukebe

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

    lol for wes bos, run linter but skip warning 😂

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

    Sorry why not tRPC

    • @steve-adams
      @steve-adams 2 หลายเดือนก่อน

      That's exactly what crossed my mind. There's no code gen, so it should fit in fine, right?

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

      trpc is great when you your client is typescript / in the same repo. hono is for building more general purpose APIs that can be called from any client or language, especially when combined with open api (which integrates really well).

    • @steve-adams
      @steve-adams 2 หลายเดือนก่อน

      @@syntaxfm Ah, totally fair! I'm so accustomed to that kind of workflow, it seemed obvious that it should be tRPC. But of course, countless people wouldn't benefit from it, or it could even make things more complicated. For no real reason.

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

      I believe there is already middleware to connect Hono and tRPC. Couldn't tell you how well it works, though

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

    Nope.It's over. I'm not trying anymore JS / TS "frameworks" that will be abandoned / superseded in 5 months. JS / TS had a good run but the wheels are coming off.

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

      I've built hundreds of express applications throughout the years and now dozens of hono apps. The benefits are real and worth the switch. I tried many of the libraries that have come along throughout the years like koa, fastify, nest, hapi etc. but kept going back to express. I also manage / maintain express starter templates that get a lot of usage, but I'm still switching to hono for all my new apps. -CJ

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

    Awesome timing. You came out with a video on hono while I was researching encore.ts, elysia, and hono.
    Elysia seems more readable than the alternatives.
    Your next video should be on encore.ts. Their development dashboard should be standard on all backend environments.

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

      elysia only works with Bun.
      I have looked into encore before, the way to build apps is very different than what I'm used to. I like that hono still feels like express. Infrastructure as code seems nice, but the things they show in the docs for typescript look like they are re-inventing the wheel for most solutions instead of reaching for existing libraries.

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

      Elsyia looks great, but being a Bun only package does it no favors.

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

      ​@@syntaxfm I think reinventing the wheel is not a bad thing considering many independent npm projects sometimes "die out" (like Express not updating as much in spite of its adoption and popularity).
      I like the Laravel mentality (packages maintained by the org itself) and so far I am seeing Adonis and Nest JS (sort of) following this approach

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

      I really want to use elysia but it’s a sad story getting it working + type safety in deno

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

      ElysiaJS doesn't only work with bun - it just leverages bun's faster APIs if they're present. I like Hono and Honox, and use them, but I thought ElysiaJS did a much better job making inferred types "just work". I don't like having to manually specify types - inferred types all the way! :)

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

    Small suggestions, maybe have all participants on the screen all the time instead of jumping around which is quite distracting. Person A is talking which put them on the screen, then person B makes an agreeing noise, the screen jumps to them and jumps back to person A. Please make it stop doing that.

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

      Young people love that

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

      Every video recorded podcast is like that, I don't know why. I assume it is some common podcast software that makes those jumps, but I agree, it's really annoying.

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

    Express for life

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

    YET ANOTHER JS FRAMEWORK. Whatever happned to the hype train of QWIK, and SOLID JS??

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

      Hono is mainly a backend framework

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

    You should not drop express - Hono not needed