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 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
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.
@@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
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
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.
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
@@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?
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..
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
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.
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.
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
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!!
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?
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.
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.
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).
@@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.
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.
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
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.
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.
@@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
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! :)
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.
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.
I like the way how CJ making up his thoughts & presenting hard topics in an easy interesting way !
CJ regularly impresses me! Great content, thank you.
CJ embodies the ideal qualities of a developer-gracious, kind, friendly, and an all-around great person. Truly an awesome individual!
We love CJ.
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
I guess HonoX meta framework is doing something similar and maybe more than tanstack-router.
@@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
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.
I wanted to like this more 👍👍👍
The bit about it pushing Express release is so not true.
How do you know that?
@@Joshua-dc4un because I happen to be in these conversations so first hand knowledge that Hono had nothing to do with it.
@@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
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
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.
Next, I'd love to hear your opinion about Nitro 👀
That intro jingle was dastardly
Lmao had to repeat it a few times to figure out what's going on
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.
we request a complete project: "Hono inside of Next.js".
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
@@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?
What do u think about elysia js?
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.
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..
Been a while Wes Bos. Where have you been? You thought me JavaScript object destructuring back in 2016 or there about.
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
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.
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.
the guy got hired at cloudflare to, what I believe, is to continue working on this, but I do get your point
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
i use nest, i mean it's standard js at BE in my country.
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!!
There is a plugin for that: www.npmjs.com/package/@hono/vite-dev-server
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?
+ 1
@@pookiepats Why not?
And is there an alternative?
Ts-rest then we can defer the implementation of server api side.
How does it compare to Fastify?
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.
HonoX is pretty nice
try nitrojs, please ❤
how about Hyper-Express? if we gonna jump ship there'd better be a good reason.
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.
is cj the creator of hono?
No, the creator is Yusuke Wada, he works at Cloudflare - x.com/yusukebe
lol for wes bos, run linter but skip warning 😂
Sorry why not tRPC
That's exactly what crossed my mind. There's no code gen, so it should fit in fine, right?
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).
@@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.
I believe there is already middleware to connect Hono and tRPC. Couldn't tell you how well it works, though
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.
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
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.
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.
Elsyia looks great, but being a Bun only package does it no favors.
@@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
I really want to use elysia but it’s a sad story getting it working + type safety in deno
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! :)
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.
Young people love that
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.
Express for life
YET ANOTHER JS FRAMEWORK. Whatever happned to the hype train of QWIK, and SOLID JS??
Hono is mainly a backend framework
You should not drop express - Hono not needed