Ok, but what is it doing? How can it help me? The snippets subpage is empty. The examples have code directories with almost empty readmes.
Ok, but what is it doing? How can it help me? The snippets subpage is empty. The examples have code directories with almost empty readmes.
Hono is a JavaScript framework designed to run on (but not just) Edge runtimes. It’s nice due to it being very “lightweight”. It was mainly for server side functionality but this release adds more front end functionality, which I find quite welcome.
Personally I have found this works well if you’re targeting those platforms. For example, I use it on Cloudflare Pages with Page Functions and it works a dream.
I haven’t found it to be a write once target anywhere platform (for example, serving static files differs between platforms), but it makes it significantly less effort to migrate to a new platform if necessary, which is always nice.
> Hono … is a small, simple, and ultrafast web framework for the Edges. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, AWS Lambda, Lambda@Edge, and Node.js.
All of the code examples look like a slightly different syntax for express.js.
So it's a server side javascript framework for handling HTTP requests?
Since it targets multiple runtimes, I suppose it's "express.js but without the node.js dependency?".
I feel like that's closer, but I'm still missing the "why should I care?" part.
you can't run traditional http servers in edge sandbox worker environments.
frameworks like these target deno deploy, cloudflare workers, aws lambdas, etc.
they are small to fit in worker 1mb~ limits and use browser apis instead of node apis to fit the env.
bonus: sharing the same apis on the server and client also result in being able to share code client/server side.
You'd only care if you were in the "serverless" field, and then you'd likely already know about Hono since it's linked in many documentations like Supabase, Cloudflare, Deno, etc.
But you may not know about Hono because there are many options and some ways to be in serverless without seeing it yet and it's the newest framework I know of. (also my favorite so far other than raw deno)
--
This particular release was linked since it's one update that turns it into a real framework like Next or Astro.
They added 3 major features:
- Static Site Generation
- Client Components
- File-based Routing
Static site generation (SSG) would mean certain routes compile at build time and the worker won't compute them on the edge.
Client components means they now support client side rendering (CSR), before Hono was only used for server side rendering (SSR).
File-based routing is instead of coding your paths, the folder structure is used for routing, similar to Next which mimics how traditional http web serving works.
--
This is important for users of Hono as it unlocks features that exist in larger frameworks while still staying extremely minimal and flexible.
Also "web standard API" doesn't really mean anything? Might just be because the authors are not native English speakers tho.
I'd rewrite the main description to "Hono: Fast, Lightweight, web framework to build APIs" or something. See FastAPI landing page [1] for a reference: "FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints." I know immediately what this is.
"Hono
Fast, Lightweight, Web-standards
Runs on any JavaScript runtime."
lightweight = small code size
web standards = not node apis (fetch, not http.createClient, etc.)
runs on any JS runtime = runs in deno/node/bun/workers/etc
---
But yes the project is meant to be read by someone already in the field.
The people who actually know how to use it.
Yes it seems like a fancy combo of words if you don't know what they mean, but that's true for anything.
This is untrue: it's possible to make things much more accessible than they are here.
You write for an audience. This project could have written a description that works for "most programmers with any background at all in web development." Instead they chose a much narrower audience. People are complaining about that choice.
But it would be more fun to talk about the tech.
1. The OP is not the author of this project.
2. The project author did not know it was going to be directed at a more general audience.
3. They may have prepared the README for that if they knew.
4. Enjoy the tech and stop being so damn nitpicky HN
So to end this, I explained the tech and reason why: