Live data from Hacker News

Datastar: Web Framework for the Future?

chrismalek.me

61–70 of 161 posts

Re: Datastar: Web Framework for the Future?

#62
post #9
post #6

This is the second post I’ve seen praising Datastar in the last 24 hours, and once again no mention of the requirement to punch a gaping hole in one’s Content-Security-Policy. If this is the framework of the future, cyber criminals are going to have a bright future!

How does this compare to HTMX (security wise)?

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

Re: Datastar: Web Framework for the Future?

#63
post #6

This is the second post I’ve seen praising Datastar in the last 24 hours, and once again no mention of the requirement to punch a gaping hole in one’s Content-Security-Policy. If this is the framework of the future, cyber criminals are going to have a bright future!

That's the nature of anything that does this kind of work. React, Svelte, Solid. Alpine has a CSP version but it does so little that I recommend you just accept being a Web1 MPA basic site. I have ideas around ways around this but it's a per language template middleware.

Is there anything I could read detailed explanation of issue, in particular w.r.t datastar?

Re: Datastar: Web Framework for the Future?

#64
post #62
post #9

Earlier quoted context omitted.

How does this compare to HTMX (security wise)?

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)

Re: Datastar: Web Framework for the Future?

#65
This looks really good. Kudos to the authors!

It's great seeing a rise of web stacks that embrace small libraries and native web technologies, and reject mega monolithic frameworks. It's about time the industry moved away from the React/Vue/npm insanity.

I'm also intrigued by Nue, but Datastar fits nicely in a full stack solution. The choice of SSE is brilliant. It's great tech that's generally underutilized.

Re: Datastar: Web Framework for the Future?

#68
post #6

This is the second post I’ve seen praising Datastar in the last 24 hours, and once again no mention of the requirement to punch a gaping hole in one’s Content-Security-Policy. If this is the framework of the future, cyber criminals are going to have a bright future!

could you please elaborate on this?

Re: Datastar: Web Framework for the Future?

#69

Earlier quoted context omitted.

I think, at least as the creator, I've seen the "fight" be MPA vs SPA. IMO, both are wrong. It's about state management. MOST state lives in the backend but you still need fine grain reactivity on the frontend. On the number line between React and HTMX; Datastar is complex :)

Data may live in the backend, but it is used more in the frontend. Having it local (in memory, or even indexeddb) makes more responsive apps, especially if it's a typical CRUD app with 70/30 or more split between reads/writes.

Its possible to run the datastar TS/JS SDK in a service worker, if you want to do (isomorphic with the backend) templating from there or just returning pre-cached html fragments.

Re: Datastar: Web Framework for the Future?

#70

... was kinda inevitable that HTMX was going to bring about a Cambrian explosion in frameworks like the one it was built to escape.

Datastar started as an attempt to help shape HTMX2 before that was a thing... https://github.com/delaneyj/nothtmx2

Not sure the negativity. It's a superset of HTMX and it's 40% smaller with more features. Can you please tell me issue? I'm to dumb dumb grug please teach me senpai

Post reply on HN