45 comments

[ 2.3 ms ] story [ 76.1 ms ] thread
Everything about this seems so bad! The website doesn't look serious at all. The code adds crazy html attributes, even more crazy than other crazy front-end frameworks like `data-on-input__debounce.200ms="@get('/examples/active_search/search')"`... this level of wrong is incredible.
Seems pretty elegant if you are willing to give up on the type safety of TSX. I wonder if this can be combined with it somehow. An example using Fresh would be great.
This feels like an interation on Hotwire
this looks awesome dude
Maybe it is because I'm a bit too deep in the React ecosystem at this point, but once you start trying to do any reasonably complex task, this seems like it would be significantly harder to reason about.

Also, unless I'm misunderstanding it, this revolves a lot around the backend returning HTML to do backend-as-frontend, which given my previous experiences with the concept, I wouldn't want to touch with a 10ft pole. When you consider users with extremely bad internet connections (there are still people on dsl/older satellite/2G), having to make more requests to the backend that return larger blobs of html (as opposed to fewer requests that return JSON when it is relevant) will result in a significantly more degraded user experience

"Frontend" is a huge field.

Some people write their own websites where they blog (where Wordpress would be enough), some build shops with mostly static content that has to load fast but has no real interactivity, others build full-fledged software like Figma/Discord and for the true masters, the DOM is a prison and only <canvas> coupled with GPU-accelerated computations will do.

Obviously htmx and it's siblings are nice for blogs, docs and shops. You don't build a "software" level website with it.

It isn't mentioned on the homepage, but Datastar does charge for the following features:

    data-animate - Animates element attributes over time.
    data-custom-validity - Adds custom validity to an element.
    data-on-raf - Runs an expression on every animation frame.
    data-on-resize - Runs an expression on element resize.
    data-persist - Persists signals in local storage.
    data-query-string - Syncs query string params with signal values.
    data-replace-url - Replaces the URL in the browser.
    data-scroll-into-view - Scrolls an element into view.
    data-view-transition - Sets view-transition-name styles.

Prices are $299 for a solo dev and $999+ for teams

https://data-star.dev/reference/datastar_pro

You should probably update your comment to at least let people know this is a one-time lifetime cost. Not a subscription.

Which is priced similar to Tailwind UI, which people are fine paying for.

Those prices are for one off lifetime purchase too! That's crazy. I don't know why they bother. They'll never make back the money for the time they put in developing it.

Such a bad move. I told them they should charge more and actually have useful features in pro.

That movie at the bottom makes me want to use it for any next project. Gold. "The planet uncomplicanus" :D
Oh great, yet another front-end framework, but this one is with paid features as well. Are we seriously going to pretend this isn't getting out of hand?
it's really a full stack back end agnostic framework. i haven't really seen anything like it.
For those of you who don't think Datastar is good enough for realtime/collaborative/multiplayer and/or think you need any of the PRO features.

These three demos each run on a 5$ VPS and don't use any of the PRO features. They have all survived the front page of HN. Datastar is a fantastic piece of engineering.

- https://checkboxes.andersmurphy.com/

- https://cells.andersmurphy.com/

- https://example.andersmurphy.com/ (game of life multiplayer)

On both the checkboxes/cells examples there's adaptive view rendering so you can zoom out a fair bit. There's also back pressure on the virtual scroll.

Does anyone have a detailed comparison of the functionality you get from Datastar versus HTMX + Alpine.js? My impression was that Datastar was trying to be a lighter weight combination of the other two.
It sounds like some form of Event Sourcing? I didn't get much technical details from the page, and the (otherwise excellent) movie.
Reinventing the wheel and then charging for simple features?

If this paradigm excites you, just use Phoenix, dawg. It's so far ahead, everything else feels primitive.

This post and other posts about datastar on the hn frontpage seem unnatural to me. It's like a marketing effort to astroturf this, especially with newly created accounts interacting with this...
I think it was probably the copycat/followup effect rather than anything coordinated, but I haven't looked closely.

Trying to decide whether to merge the threads and/or which of them should 'win'...

One submitted by me, and this one by others, both accounts are ~2012. Not exactly new account.
I think something I'd love is to see how to adopt some of the more decent frontend practices (e.g. having a component library) but rendering them using a backend that isn't something like NextJS. Can you import a component library and use it in a Flask app, say, or are the worlds just fundamentally too different?
Datastar is one of the few projects in the web ecosystem in years that feels like a paradigm shift for the better.

The author (Delaney Gillilan) has put a lot of thought into how modern web development should be done from first principles, while leveraging core web technologies like SSE, and eschewing complexity as much as possible. His proposed GoNaDs stack[1] enables some truly impressive web applications. I highly recommend watching this talk[2] to get a sense of what's possible.

I wish the best of luck to the core team and contributors, and hope that this framework, or something like it, disrupts the modern ecosystem of popular web frameworks and stacks.

[1]: https://gonads.net/

[2]: https://www.youtube.com/watch?v=0K71AyAF6E4

Not sure why the community is being so hostile like use phoenix or it charges or its hostile

Like no its not.

This is a genuinely cool project and most parts of it is open source and it can run on any language and its interesting that they are looking at a way so that they can fund the development of it in the process as well

Its their project and they are the only ones entitled to really push things the way they want.

It looks cool and I might hack with it in golang. Thanks a lot for your work.

One minor feedback I want to share is that although I don't mind having a charge for things, 299$ especially in my country is a seriously lot of money and I think that some of these might be needed by me if I go full in on it but I genuinely can't afford even the single tier one.

Could the non profit atleast have some dynamic pricing for all countries sort of like steam? And/or donating to people.... like I mean genuinely no shade whatsoever at the datastar team but animation etc. are already available in sveltekit for free and I don't want it for free but I just genuinely can't afford it here...

Another suggestion could be to lean very heavily on the entreprise who can afford such things much rather easily or maybe even more and maybe you/team can lower the price for solo so that solo devs can try things out and not be worried for 299$-ish y'know?

Deep respects for the project, Its another tool which is mostly free so the community's reaction is very weird for that...

But if I can be genuinely honest, I am saying this as a guy who has never paid any community/anything online but I would for the first time genuinely sponsor the project for 5-10$ (I know it ain't much but that's all I am comfortable with donating as a teenager right now)

Can you please charge atleast the solo level to atleast be the price of the silksong? I don't know but I will try the project out as it looks super cool

> Not sure why the community is being so hostile

I cannot speak for other people, but here is where I'm coming from:

- There is no mention of Pro on the home page, I only found out about Pro after flipping through the documentation. This comes off as sleazy, like "Look at our cool open-source project", and then after they have you hooked they go "oh, if you want all all of it you gotta get Pro". - Pro is locking genuine features, not just support, video tutorials or code examples. - It is vendor lock-in, if you want to rely on any Pro feature you are now at the mercy of the maintainers. - What make the vendor lock-in particularly problematic is the fact that without Datastar your website will not work. Sure, it does suck if your CI service, test platform or whatever does not work, but as long as you can compile and deploy the code you will survive, even if you have to do it by hand. Not so with a library. - There are no examples of what your are buying. At least with the non-Pro features you can try them out for free without any commitment, but when it comes to Pro you are just taking a blind guess as to whether any of them are what you want. Compare that to the Pro examples Alpine has[1], where you can play around with them in the browser. - I don't know if you get source code, but even if you do you cannot share your improvements with anyone.

Note that I never mentioned the price. The value will vary from person to person, for some it will be unaffordable, for others it will be a great deal (e.g. freelancers who will make the money back within one gig). I got my employer to sponsor Alpine a year ago and they have given more to Alpine than what Datastar are charging for Pro.

For reference, two projects which have non-objectionable Pro versions are Alpine.js[2] and React Flow[3]. React flow even have a link to their Pro page right on the home page.

[1] https://alpinejs.dev/components [2] https://alpinejs.dev/components [3] https://reactflow.dev/pro

This pattern isn't new per-se. The industry already went through it when moving from DHTML to XHR, and it was (mostly) abandoned for good reasons. Modern DOM patching techniques gave rise to some newer variations, but they still make the same old trade-offs. They don't really solve engineering issues like tight coupling and brittleness, nor network issues like latency and larger payload volume.

So, to me, this feels more like an effort to offer a more affordable solution (in terms of engineering cost) for small-/mid-sized companies, rather than a push to expand the boundaries of the technology. Not a bad thing, but it's just a bit disappointing to see history kinda looping back on itself.

Seems interesting.

I don't think its going to make me swap from htmx, though. We shall see.

Interesting, but do I understand correctly that:

- this would mostly work if the sole consumer of your API is the frontend, since it returns HTML, rather than, eg JSON that would be consumed by a CLI, some streaming tools, clients, etc

- this would not really be suited to some Capacitor app?

Yeah it assumes your building a full stack app driven by the backend. So the client and backend are tightly coupled and built for each other.
Datastar's ideas look wonderful, and I've thought of adopting it myself, but hobbling the open source version to not compete with pro this early on sounds like a fast ticket to a hard fork. It's not like they command a vast ecosystem that would be reluctant to switch.

[edit: Seems like the model with an open core and some closed plugins could work out fine. If not, everyone's got options. Wishing success for both the D* developers and the users.]

Is there documentation on how they made that slick Star space animation on the front page? Very cool and retro looking
It's just a basic 1kb web component driven by datastar attributes
as a newb, does datastar work on mobile?

Most web pages I try to build never look right on firefox on android.

I've been building a frontend with Go, Templ and Datastar for a few months now. I really like the @actions and how the page is updated with the response.

I'm on the fence about signals though. They are fine for simple things like individual text form fields or opening closing a drop-down. But my backend is a Kubernetes style API server. And storing a JSON Kubernetes style resource in a signal does not work because of how Datastar implements parsing the structure into child signals. For me it would be better to just be able to turn this off.

One example where it breaks are K8s labels. They are map[string]string and the key is often hostname prefixed. E.g. example.com/label-key. Datastar can't handle these keys at all and the resulting signals are a mess.

I'm aware that I may be using signals not as intended. But something as simple as data-signals-resource="k8sJson" and then data-bind="resource.metatdata.name" is a great way to work. And it works for metadata name. But it doesn't work if any part of the path needs to be an index in a list or a label key in hostname style.

The other thing I find painful about Datastar signals are the magic about how attributes written something-something in HTML become somethingSomething in JS and all all the snake, camel etc. __modifiers. It's just error prone to work with. Not a great experience.

But overall I still stuck with it so far and am happy with the general idea of HTMX and Alpine functionalities implemented as one and using hypermedia as a general approach. Anything so I can avoid the NodeJS ecosystem really.

When a few RCs back the wire format changed, it was quite a laborious update for me, because using Fiber I can't use the Go SDK and implemented my own. But the wire format clearly changed for the better so it was worth it.

I think the developers are on to something and should keep iterating.

Having followed Data-* from its beginning, it's now fascinating seeing how these threads play out. The troll-y takes from those who took one brief look at the front-page and felt compelled to tear it down in their own 'worthy, hot-take'.

Like T3, the critiques usually compare to JS stacks or how non-HTML it looks(!). It just doesn't make sense to them, so... "I know what I must do, instead of looking into this more, make sure I have a fuller picture of this thing, HN NEEDS to know now".

You have every right, of course. But you undermine yourselves as soon as you post - you clearly have not taken any time to understand where it came from, why it is what it is. Your responses are not, say, genuine questions for clarification or helpful critiques. For the most part they are straight out judgements: 'This is just wrong'.

Of course in your minds the front-page MUST provide you all that in under 30secs, yes? Like, the 'hidden', 'real cost' is ON ANOTHER PAGE?! - instead of reading the reasoning behind it and why YOU won't need it.

You don't need to immediately post here - you are not really looking for answers, are you? You could've just read the website and history of Data- for that?

To all the 'clarfiers' here like Delaney, Anders, nchmy, and others, thank you for the comments refuting most of this stuff, it must be tiring.

All the best, An old, grumpy, ex-HyperCard 'programmer'. *You don't need to validate your comment by reply to this, many comments here are valid and you know it.