Hello, last week I attended the http4k talk at Kot...
# http4k
k
Hello, last week I attended the http4k talk at KotlinConf. It was excellent and I am hoping to find an example of a http4k x Datastar integration. I tried visiting the URL at the end of the slide deck (https://github.com/http4k/full-stream-ahead), but it returns a 404. Was this URL meant to point to an example or is there perhaps somewhere else I should look?
http4k 1
d
The repo is called examples
k
Thank you!
👍 1
m
BTW, why do you prefer Datastar over htmx?
d
Since that talk was about breaking protocol barrier - datastar was used in combination with SSE. Which was quite impressive.
d
@Mikael Ståldal they're both good, but I think the edge that datastar has is that you can seamlessly transition between streaming and non streaming responses without any changes to the client-side (because the SSE format for returning content is always used). It also incorporates alpine.js into the same tiny footprint One downside is that if you're doing things like approval testing, the format which comes back is less nice for comparisons unless you unpack it and extract the event data.
m
OK, interesting. I have only used htmx myself.
I got a bit suspicious about Datastar since they make so much fuss about tiny footprint. While small footprint is good, it can't be that important to go from 40 KiB to 17 KiB (especially not if that bundle can be on a CDN and cached across multiple sites).
d
I got a bit suspicious about Datastar since they make so much fuss about tiny footprint.
Well this is true, but I think to a certain extent they're just trying to get attention in a room where all of the air has been sucked out by HTMX. They seem to be.a nice bunch, and the author definitely knows what he's talking about - although he's more of a grumpy foil to Carson's personality. 🤷 .