hono icon indicating copy to clipboard operation
hono copied to clipboard

Hono Future Plans

Open brillout opened this issue 3 years ago • 4 comments

First of: congrats for developing such a lovely project! It's exciting to see server-side JavaScript evolving.

I'm curious about how you see the future of Hono.

I think there is great potential and @cyco130 and myself are dabbling around with a new server framework called HatTip. (The project was mostly done by Fatih (@cyco130) — I just co-thaught HatTip's design a little.)

Hono and HatTip are similar in that they both enable the user to write server code that runs on all kinds of deploy platforms.

HatTip also focuses on:

  • https://github.com/hattipjs/hattip/issues/13
  • https://github.com/hattipjs/hattip/issues/18.
  • Deep integration With Vite's development server. (Enabling a deeper zero config DX for Vite users.)

I wonder what your thoughs about these are?

If we could, somehow, collaborate I think that would be great, and I think I can speak for Fatih as well :-).

For example, I think we can share code about runtime adapters. Maybe we could even merge the projects altogether (more difficult though as we'd need to align about the future).

brillout avatar Jul 18 '22 07:07 brillout

Hi @brillout !

After we've released Hono v2.0.x, we are just taking a wait and see how users use Hono right now. Then, we will make third-party middleware in the next step #407

I don't think much after that. This is the current status.

I wonder what your thoughs about these are?

These ideas are pretty good for development. But I don't think they are not suitable for Hono. Hono is just a web framework. That will not change in the future. No possibility of bundling CLI, at least not at this stage.

Platforms that Hono works on have each CLI or commands such as Wrangler, deno, or bun. They are pretty good. Using these, TypeScript is out of the box and an easy to run a development server. On Cloudflare Workers, we deploy it quickly by a few wrangler commands.

So, we just provide a "web framework" and leave the command part to other applications.

I think we can share code about runtime adapters.

Currently, I think we don't need to make the adapters. Because adapting it for the platform is not so difficult for the user. For both Cloudflare Workers and Bun, we can make the entry point with the same code:

export default app

My final thought, HatTip and Hono are similar but different in concept.

PS.

Your projects seem to be good. HatTip may provide a coherent development experience. And, the idea of your "vite-plugin-ssr" that makes vite do SSR is interesting. I'll check out more things about you made.

Thank you!

yusukebe avatar Jul 19 '22 23:07 yusukebe

(I will reply this weekend / next week :-).)

brillout avatar Jul 22 '22 21:07 brillout

(Tomorrow 🙂, been quite busy with vite-plugin-ssr :-).)

brillout avatar Jul 31 '22 15:07 brillout

These ideas are pretty good for development. But I don't think they are not suitable for Hono. Hono is just a web framework. That will not change in the future. No possibility of bundling CLI, at least not at this stage.

On one hand I agree. (Being the author of vite-plugin-ssr, which is a do-one-thing-do-it-well tool, I do appreciate such laser-focused approach.)

On the other hand I'm not sure how development DX with Hono would work out. That's a big advantage of integrating with Vite: HMR comes for free thanks to Vite.

The way I see it is that core should be do-one-thing-do-it-well (like Hono), while nothing speaks against extending that core with integrations with development environments (like HatTip's Vite integration).

I'd also say that the same argument holds for zero-config integrations. Nowadays users expect things to just work (rightfully so!).

All-in-all, I believe we can have both: zero-config (development) integrations + do-one-thing-do-it-well core. (FYI I have a similar goal with vite-plugin-ssr: I'm fostering an ecossystem of zero-config frameworks that are built on top of vite-plugin-ssr.)

Platforms [...] have each CLI [...] such as deno, bun, wrangler

I agree and, actually, you can use these with HatTip. It's nice to use the "beaten path tool" for each environment, but I also think it's nice to be able to have a coherent DX across environment. (Similarly to SvelteKit's adapters.)

PS. Your projects seem to be good.

Thanks :-), I also really like what you are doing! It's great. In case you are on Discord, hit us up! If you want. (You can find us at HatTip's discord as @fatih and @brillout.)

As for collaoration, I think #443 will do the trick. (Although I still believe we should at least try to see if we want/can merge both projects together.)

brillout avatar Aug 01 '22 19:08 brillout