Live data from Hacker News

Datastar: Web Framework for the Future?

chrismalek.me

81–90 of 161 posts

Re: Datastar: Web Framework for the Future?

#82
post #62

Earlier quoted context omitted.

You can disable all use of eval with htmx. The tradeoff is one has to write a bit more JavaScript. https://news.ycombinator.com/item?id=43650921

I have thoughts about a fully compliant CSP middleware, problem is it's per language so I'd probably only make for Go (maybe PHP & TS)

Hashes or nonces?

Re: Datastar: Web Framework for the Future?

#83
As you escape the React/JSX intoxification, you can drop the XML syntax.

It took us a while back in the day after the XHTML arc, but for sure it'll be ok.

I know this looser SGML universe might feel a little kooky, but trust me it wears baggy trousers, rocks gifs with a hard g and offers great .

  
  

Re: Datastar: Web Framework for the Future?

#84
I love the idea of datastar, but wonder how does one test it without using e2e testing? Also, I think it would be amazing and so much simpler if instead of using SSE, it just included all the events in a response. Maybe with SSE as an option for those who need true server pushes? I feel like most apps don't require server push, and instead just need a list of events/things to update from an action.

Re: Datastar: Web Framework for the Future?

#85

Nitpicking but > SSE enables microsecond updates, challenging the limitations of polling in HTMX. How is this true? SSE is just the server sending a message to the client. If server and client are in opposite sides of the world, it will not be a matter of microseconds...

Reminds me of the joke "hey, check out the website I just made: localhost:8080"

Re: Datastar: Web Framework for the Future?

#86

I love the idea of datastar, but wonder how does one test it without using e2e testing? Also, I think it would be amazing and so much simpler if instead of using SSE, it just included all the events in a response. Maybe with SSE as an option for those who need true server pushes? I feel like most apps don't require server push, and instead just need a list of events/things to update from an action.

So unlike HTMX we support merge in both fragments and signals. We also support custom events natively for purely local state. We just make the browser declaratively reactive, that's it

Re: Datastar: Web Framework for the Future?

#87

Nitpicking but > SSE enables microsecond updates, challenging the limitations of polling in HTMX. How is this true? SSE is just the server sending a message to the client. If server and client are in opposite sides of the world, it will not be a matter of microseconds...

Well obviously there's a difference between latency and throughput. Of course it's going to be microsecond plus your rtt/2. Sorry, we can't beat physics.

Re: Datastar: Web Framework for the Future?

#88

Really well-written and well-structured post! I'll seriously evaluate Datastar in my next toy project because of the author's praises! For people who are looking for HTMX alternatives, I think Alpine AJAX is another choice if you are already using AlpineJS

Ian is great, if you want progressive enhancement it would be my go-to every time!

Re: Datastar: Web Framework for the Future?

#90

Nitpicking but > SSE enables microsecond updates, challenging the limitations of polling in HTMX. How is this true? SSE is just the server sending a message to the client. If server and client are in opposite sides of the world, it will not be a matter of microseconds...

Well obviously there's a difference between latency and throughput. Of course it's going to be microsecond plus your rtt/2. Sorry, we can't beat physics.

Everyone knows no one can beat physics. That doesn't excuse claiming you can beat physics.
Post reply on HN