4 ms·
A better way to think about it is that HTMX avoids large, stateful, client-side applications, so that you keep all the actual logic on the server. You can still
by deredede 3y ago
A better way to think about it is that HTMX avoids large, stateful, client-side applications, so that you keep all the actual logic on the server. You can still choose JS on the server side if you want, it's just no longer forced on you.
In this specific case, the point is to run the backend on the Cloudflare edge, and that only runs V8, so using a JS backend makes particular sense.
- mattsan 3y agoThey also support Rust directly with WASM (I believe no JS loader, not too sure though). Would be interesting to see Rust on edge with htmx.
- deredede 3y agoYeah, and a bunch of other languages that also compile to wasm. But wasm is rarely a "first class" citizen (it is a tier 2 target for Rust, so there are no automated tested, for instance), so again, can't fault anyone for not making that choice. But yeah, would be interesting. Actually, I'd also be interested in a perf+efficiency comparison between JS and $lang+WASM on the backend, because this discussion makes me realize that the JIT tradeoffs are wildly different for a long-running process servicing many requests per second compared with many copies of a single-user client.
- mattsan 3y agoYeah but Cloudflare integrates really nicely with Rust compared to other languages that compile to WASM, e.g. their service bindings