Use this instead of HTMX

preview_player
Показать описание


The Kotlin server side rendering adventures continues in this latest installment. HTMX can be replaced by 1 line of Javascript, the author calls it HTMZ. This is very cool.

0:00 intro
0:18 state of web development
0:56 too BIG
1:06 htmz
1:54 converting from htmx to htmz
3:20 explanation
3:54 final thoughts
Рекомендации по теме
Комментарии
Автор

Just to clear up any confusion, I am being somewhat satirical about this replacing HTMX and about the size being too big. I just thought this was interesting and funny

tom-delalande
Автор

I can't wait for Prime to react to this one.

hjkl-hfud
Автор

guys wait for htmR written in Rust
and htmC which is written in crab language

basilalharbi
Автор

Using anchor target is so smart. You can make it a lot more elaborate without much effort too!
Another crazy thing that this enables is content streaming, because the iframe will actually receive an HTML stream from the network (unlike fetch).

Atmos
Автор

So it loads the destination into the iframe and then hot swaps it with the element itself, htmx can do way more than that, but it's really interesting how simple it can get.

_modiX
Автор

LOL. 14KB too big. That can fit inside a single TCP packet!

KangoV
Автор

feels like a toy snippet, very cool and novel, but impractical for anything larger than a tiny project. i really appreciate it though and think it's very cool.

jackgisel
Автор

Thats pretty neat, fitting it into so few bytes

Would be a cool tool to quickly prototype UI ideas, maybe

In my use cases with HTMX, I make heavy use of OutOfBand updates, as well as either SSE or websocket events pushed to the client. But otherwise, yeah, pretty cool

I hope they don't try to add too much more to it and attempt to turn it into a kitchen sink library

steveoc
Автор

Can you make a video about setting up kotlin htmx project with gradle cli, i couldn't make it work after try lot of things.

origin-pehy
Автор

Ive been trying out some HTMX and the size actually was the biggest thing that deterred me. So HTMZ sounds pretty cool

Dominik-K
Автор

HTMZ is very smart use of built-in browser features and an excellent proof of concept, but it has too many drawbacks for large-scale production use; inability to load scripts from responses, lack of options such as swap strategy or request method, and of course the inability to work with any elements besides <a> and <form> without additional glue code. It could easily serve as a starting point for a more full-featured library, but it doesn't hold up under the pressure HTMX can easily take in actual practice.

foxoninetails_
Автор

I was using a technique similar to this, circa 2000 🤣 to update right click context menus from the server.

softgripper
Автор

took a quick read through the docs, "No preventDefaults. No hidden layers. Real DOM, real interactions. No VDOM, no click listeners. No AJAX, no fetch. No reinventing browsers. "
i will probably reinvent a fetchapi request translation layer as i use it a lot. however if if it could be done with less code served to the client i will do it. i like it when i pass data to the server and it passes data back to update the state. it would be hard to simplify my workflow to something like this

Meleeman
Автор

Cool, however, is it normal that the URL doesn't change at all as links are clicked at 01:43? Has the history management to be done manually in this case?

MxSmack
Автор

Nice little script, but it doesn't even push to the history stack, let alone dom morphing. This is only a "concept" not something you could use even when testing.

Cool concept tho!

eptic-c
Автор

So htmz is htmx without external dependencies.

anotherelvis
Автор

Could you make a tutorial on how to install Tailwind on KTor project? Great content!

camio
Автор

That mf is your typical lead Frontend Developer

lokthar
Автор

thats jokingly small.
ill honestly be using this for small CUDS from know on that i just want to throw together.

MrSofazocker
Автор

14KB, while I type this comment I can see on my Network tab around 5x that being transfered...

picudo