[HN Gopher] Datastar: Lightweight hypermedia framework for build...
___________________________________________________________________
Datastar: Lightweight hypermedia framework for building interactive
web apps
Author : freetonik
Score : 285 points
Date : 2025-10-10 08:46 UTC (1 days ago)
(HTM) web link (data-star.dev)
(TXT) w3m dump (data-star.dev)
| gregoriol wrote:
| 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.
| macmac wrote:
| Could provide actual arguments for why these aspects of
| Datastar are "crazy", "even more crazy" and "wrong"?
| gregoriol wrote:
| What more do you need than writing something like `data-on-in
| put__debounce.200ms="@get('/examples/active_search/search')"`
| in the DOM as being crazy and wrong?
| macmac wrote:
| So your answers is no, you cannot provide any arguments.
| palmfacehn wrote:
| The poster provided an example of poor abstraction. HTML
| for display, JS for client side logic. Combining them is
| part of the problem with other popular frameworks.
| nchmy wrote:
| No, it's the entire point of datastar - that you don't
| need much JavaScript at all because some simple html
| attributes do most of it for you, and any extra can
| either go in-line, or you can also just fallback to
| separate js scripts if needed.
| array_key_first wrote:
| I think you, and others, just don't understand what
| hypermedia is or what the idea is trying to achieve.
|
| Which is weird, because this is (was?) the predominant
| way to make websites for decades.
| sudodevnull wrote:
| You mean like onclick?
| afavour wrote:
| I think OPs point argues for itself. The example provided
| is awful developer ergonomics.
| array_key_first wrote:
| Okay but _why_. Surely if you have auto complete this
| works just fine.
| daeken wrote:
| I mean, that seems ugly to me, but... Makes intuitive sense
| and is fine actually? Is HTML a rich language in which to
| embed stuff like this? No. Does this clearly get the point
| across? Yes.
|
| [Edit: this should've actually been attached to the GP
| comment. I agree with the parent.]
| hasanhaja wrote:
| Isn't that the whole point of hypermedia frameworks like
| Datastar and HTMX? It's to extend the declarativeness of
| HTML.
|
| If you don't like the syntax, that's your preference. But
| I'm curious to hear why this is "wrong". Since that's a
| more objective thing, we can discuss it
| troupo wrote:
| Because it's a mish-mash of different ad-hoc DSLs.
|
| You have a DSL based on data-* attributes
|
| But then some attributes get this weird syntax-ish
| extension
|
| Then some of those attributes accept a Datastar
| expressions DSL: https://data-
| star.dev/guide/datastar_expressions
|
| So you can have data-on-
| click__debounce.200ms="$landingGearRetracted &&
| @post('/launch')"
|
| Which is just bad design
| jmstevers wrote:
| What design do you think would be better?
| troupo wrote:
| Both Datastar and HTMX have the same issue: they want to
| pretend to be HTML. So they force themselves into writing
| several DSLs like this to pretend that this is still
| "just HTML".
|
| Since they have a full "Datastar expression" language,
| I'd just expand that. Then you wouldn't need these weird
| constructs: <button data-on-
| click__window__debounce.500ms.leading="$foo =
| ''"></button>
| jmstevers wrote:
| Well they are both "just HTML", Datastar being better
| about being spec compliant using the dataset attributes
| and all.
|
| By expanding the "Datastar expression" language, do you
| mean a compiled language or moving all the expressions
| into JS files or something else?
| troupo wrote:
| > By expanding the "Datastar expression" language, do you
| mean a compiled language or moving all the expressions
| into JS files or something else?
|
| Doesn't matter. They literally already have a Javascript-
| like DSL: https://data-
| star.dev/guide/datastar_expressions
| sudodevnull wrote:
| Datastar is spec compliant HTML. Please point me to the
| code that's not HTML spec compliant
| hasanhaja wrote:
| I can see what you're saying.
|
| But again, the API design woes are subjective and I think
| it's perfectly fine to iterate on getting this to a nicer
| state.
|
| "Wrong" to me suggests a gap in the understanding of
| fundamentals or of how things work. If the ideas of
| Datastar are fine to all of us, and our issues with it
| are ergnomics, then that can be a more focused
| discussion.
| troupo wrote:
| > But again, the API design woes are subjective
|
| They aren't. This is not good API design
| <button data-on-
| click__window__debounce.500ms.leading="$foo =
| ''"></button>
|
| > "Wrong" to me suggests a gap in the understanding of
| fundamentals or of how things work.
|
| Snide vaguely dismissive remarks don't make such remarks
| true.
|
| > If the ideas of Datastar are fine to all of us
|
| Who's us? Are these "us" in the room with us right now?
| hasanhaja wrote:
| > They aren't. This is not good API design
|
| Why isn't it a good API design?
|
| > Snide vaguely dismissive remarks don't make such
| remarks true.
|
| Agreed! I don't believe I was doing anything of the sort.
|
| > Who's us?
|
| People on this thread.
| sudodevnull wrote:
| We are limited to what is possible in the data dash-*
| spec. If you have better syntax that's going to work
| everywhere in every browser please let us know!
| troupo wrote:
| You literally have a custom Javascript-like DSL already
| https://data-star.dev/guide/datastar_expressions
|
| This wilful insanity is completely incomprehensible to me
| (HTMX and lit are also fully infected with it): "Oh no,
| we are just HTML, we can't do anything" while literally
| doing tons of things outside of HTML.
| sudodevnull wrote:
| What's your alternative that stay HTML spec compliant?
| Instead of whining show code
| troupo wrote:
| > What's your alternative that stay HTML spec compliant?
|
| Again: you _literally_ have a _custom Javascript-like
| DSL_ in Datastar. Use _that_.
|
| It's like the "it's just HTML" or "it's HTML-compliant"
| mantra somehow damages the brain, or something.
|
| Edit: this custom JS-like DSL is so prominent and such a
| crucial part of Datastar, that it's referenced in the
| very first paragraph of reference: https://data-
| star.dev/reference
|
| Oh, look, your HTML-spec-compliant thing in which it is
| apparently impossible to do anything outside data-*
| attributes somehow calls external functions, and updates
| signals, and reads signals, and does all sorts of things:
| <div data-signals-result> <input data-bind-
| foo data-on-input="myfunction(el, $foo)"
| data-on-mycustomevent__window="$result =
| evt.detail.value" > <span data-
| text="$result"></span> </div>
|
| But no! It's absolutely impossible to do something about
| data-on-click__window__debounce.500ms.leading
| robinhood wrote:
| To me, it doesn't seem any more far-fetched than, say,
| instantiating a virtual DOM in the browser.
| brazukadev wrote:
| Do you dislike Lisp too?
| IshKebab wrote:
| 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.
| ivape wrote:
| I actively look for non-TS frameworks. To me it's always been
| useless overhead. It really is a outcome of startup/enterprise
| teams that are so far away from how money goes in and out of a
| business that they sit around and think TS is a good usage of
| time. It may hurt their feelings to know plenty of people run
| successful teams and entire businesses without type safety. It
| also makes the code look like shit.
|
| To each their own I guess.
| brokegrammer wrote:
| I mostly agree with this. TS works great in large enterprises
| where developers don't trust each other. But if you're
| working on your own, or in a small team where you can easily
| agree with each other, TS just becomes unnecessary overhead.
|
| At least, that's my experience and I don't like it when
| people say that everyone must absolutely use TS when they
| don't know anything about your situation.
| hasanhaja wrote:
| The type-safety concern would be to do with your templating
| tool, right? It doesn't have anything to do with Datastar
| macmac wrote:
| With Datastar your front end logic (if any) is minimal, and you
| can use any typesafe (or not) language you want for the
| backend. If you build webcomponents for your Datastar frontend
| you can use TS to your heart's content.
| nchmy wrote:
| Datastar itself is written in TypeScript... And it is
| completely agnostic as to what language or approach you use in
| your backend, so long as you render html with the appropriate
| (web standards-compliant) attributes and expressions. Use ts,
| rust, lisp, or whatever you want on your server.
| sudodevnull wrote:
| We have tons of people using TSX in deno or bun. You are just
| creating it primarily in the back end.
| armarr wrote:
| This feels like an interation on Hotwire
| yxhuvud wrote:
| Yes, with pay to play for trivial features.
| sudodevnull wrote:
| Then fork it, it's MIT
| dev_ila wrote:
| this looks awesome dude
| VoidWhisperer wrote:
| 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
| withinboredom wrote:
| In my experience from using react apps on 2g/3g... I would much
| prefer the html. Usually, you get the content in 1-2 seconds
| with html, where you could end up with a react apps that never
| loads at all. Why does it never load? Because enterprising
| engineers usually invent their own timeouts that make no sense
| when you are dealing with bytes-per-second. There's already a
| one minute timeout on the socket, and it knows if it is still
| receiving where your application has no sense of progress.
|
| Please don't reinvent things.
| VoidWhisperer wrote:
| The issue is that if you have to make more requests overall,
| there is a non-negligible rtt for each of those requests,
| which on slow connections can add up very fast
| andersmurphy wrote:
| Try my demo [1] on 3G slow. It works fine.
|
| Turns out brotli compression does wonders.
|
| [1] https://checkboxes.andersmurphy.com
| withinboredom wrote:
| on real 3g, seems to load in about 5s. As good as
| hackernews imho
| andersmurphy wrote:
| Yup for initial load. But the subsequent interactions
| which each require a network hop and send down the whole
| page are lightening fast.
|
| Because once that connection is primed you are off to the
| races.
| fermigier wrote:
| "this revolves a lot around the backend returning HTML"
|
| - This is the way the Web used to work in the era of 56kbps
| modems (also, with ten levels of "<TABLE>" for layout).
| icedrift wrote:
| Yeah and it used to be normal to get up and grab a drink
| between page transitions.
| nchmy wrote:
| If you are truly offline, then of course this won't work.
|
| Though, it is certainly possible to cache pages since most
| sites do not need persistent state - it's just ephemeral things
| like toggling a button, linking an input box and another
| caption, etc...
|
| Though you could run the datastar js sdk from a service worker
| and if you've synced necessary state to browser storage, you
| could have your backend there.
|
| Also, for slow connections, compression is very powerful -
| especially over an sse stream where there's redundant info
| being sent. Another comment here has links to immense demos and
| the compression ratios are north of 90%.
|
| Also, slow internet is often also associated with slow devices,
| which cannot handle the bloat of React, css-in-js etc
|
| Datastar VASTLY simplifies everything while sacrificing
| essentially nothing in the way of functionality.
| knallfrosch wrote:
| "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.
| bradly wrote:
| 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
| mbvisti wrote:
| not sure i think this is a good way to fund their work BUT
| exploring models to make open-source sustainable for the
| developers does seem like a good thing, no?
| bradly wrote:
| I have no problem with anyone charging what they would like,
| but I do think it should be mentioned on the homepage. It
| feels intentionally left off which makes me think the
| developers themselves aren't 100% comfortable with the model.
| nchmy wrote:
| They're completely comfortable with and unapologetic about
| the model. And they're not hiding anything.
| DrewADesign wrote:
| Ok, so their homepage design _unintentionally_ omits that
| pertinent information. I've wasted a couple of hours
| installing a FOSS package for a personal project only to
| find out one of the most heavily presented features was a
| paid add-in. Even if it's bad communication design add
| not intentional, it _feels_ like a salesey bait-and-
| switch tactic in that situation, and they probably want
| to know that.
| nchmy wrote:
| What is it that you think is the most heavily presented
| feature that is actually behind a paid addin? Because
| they're quite vocal about the fact that most people
| should not ever need the pro license... They actively
| dissuade people from buying it.
| hasanhaja wrote:
| Which feature are you referring to?
| skeeter2020 wrote:
| not the OP, but a lot of the referenced functionality
| looks like I might use it. The problem is I'm not going
| to bother trying this and investing any effort with even
| the looming possibility I'll need to pay to keep going. I
| don't think too many people approach this space with a
| purchase evaluation mindset like say, "I'm going to test
| out this grid to see if we should buy it". In that case
| pay-for advanced functionality is part of the approach
| from the start.
|
| Also, I can't see this approach working. Getting
| enterprise adoption of a front end framework is almost
| impossible outside of React, let alone paying for a niche
| one, and the "contact us" approach is a non-starter.
| nchmy wrote:
| as i've said in many comments and the devs say ad-
| nauseum, there's very little need for anything in the Pro
| license. the fully open-source library is sufficient for
| almost all needs. And it is easily extendable with
| plugins if you want more functionality than it provides.
| hasanhaja wrote:
| Fair enough! That's up to you
|
| If the core of the framework fits what you need, you
| could write those additional plugins yourself, rather
| than relying on the official "pro" ones. My understanding
| so far is the plugin architecture is intentionally
| designed for this usecase, so you aren't beholden to the
| official maintainers to add/tweak features for your
| specific usecase.
|
| This makes the investment in the tool a lot safer,
| because you can always swap out pieces that don't fit
| your usecase, rather than start from scratch with a new
| framework.
|
| In an enterprise setting, I don't believe the cost alone
| will be the factor that drives the decision. It'd be
| weighing up the value of the framework (e.g., UI
| framework/programming language agnostic stack, simpler
| architectures, delivery speed, performance, cost of using
| the framework on users) against the license cost.
|
| > Getting enterprise adoption of a front end framework is
| almost impossible outside of React, let alone paying for
| a niche one, and the "contact us" approach is a non-
| starter.
|
| Two questions on this:
|
| 1. Why do you think it's impossible to get org buy-in? 2.
| Why do those same orgs pick frameworks like Next.js,
| whose full benefits can only be realized with
| sophisticated and paid infrastructure?
| sudodevnull wrote:
| Why is pro pertinent info? You probably don't need it.
| It's just a set of plugins and tools anyone could write
| if they needed.
| beardicus wrote:
| i went looking for pricing info and it's the last item in
| the last menu on the website... it's not exactly up
| front. i was looking for a "pricing" top-level menu item
| first, which is pretty standard nowadays.
| nchmy wrote:
| As ive said in many other comments - YOU DO NOT NEED PRO.
| The devs are very adamant about this - even aggressively
| so. 99% of apps will work just fine with the free
| library. Pro is for some bells and whistles, or just to
| support people who have invested many thousands of hours
| into making a genuinely innovative framework, and given
| it away
| skeeter2020 wrote:
| OK, then this approach will needlessly discourage
| adoption AND consume way more resources than it brings
| in. Under this structure the team needs to deliver the
| highest level of quality to the smallest paying audience
| without community support. Further, enterprise is very
| hesitant to pay for this as a product but are way more
| receptive to paying for support. Everyone would be much
| better served without a tiered free/pay product and paid
| support options.
|
| >> or just to support people who have invested many
| thousands of hours into making a genuinely innovative
| framework, and given it away
|
| I've never seen a corporation do this even with projects
| that don't try and encourage like here.
| hasanhaja wrote:
| If an enterprise won't want to pay for the product, what
| makes you think they're more likely pay for support?
|
| If you're implying they'll only pay when they've seen the
| value of the product, then the non-pro part of the
| framework is incredibly feature-rich and can easily do
| that.
| andersmurphy wrote:
| Yeah support model for a lit of projects like this
| doesn't work. Even companies like the one behind NATS
| struggle. It's almost contingent on you building a bad
| product that needs support.
| beardicus wrote:
| This is irrelevant to my comment. You claimed they're not
| hiding pricing and I'm simply saying it was a little hard
| to find -\\_(tsu)_/-
| hasanhaja wrote:
| I don't think that's a fair read of their intentions given
| how they talk about it everywhere [1]. Pro isn't there to
| paywall great features, but there to support the
| development of complex and annoying ones. The example of
| `data-on-signal-patch` that moved from pro to core speaks
| to how they're thinking about the project.
|
| [1] Time-stamped it for convenience:
| https://youtu.be/eMIB4Bkl08U?si=IfTslvZoGXVbou0w&t=1270
| NaomiLehman wrote:
| I think most people are not comfortable with making money
| or talking about money. Also people who are bad at making
| money might be bad at marketing/handling this.
| edu wrote:
| Yes, it feels scammy. Like you, I've no problem paying for
| software if it seems worth it. I've payed a few times for
| Highcharts (different companies) and I did gladly and
| without hesitation, it also feels that they're being honest
| about their business model.
| hasanhaja wrote:
| This feels incredibly unfair and harsh and is completely
| unfounded. What's the scam here?
| halfcat wrote:
| Not a scam. It just feels the same as a scam feels.
|
| One time I had a couch delivered. Two guys show up to set
| it up. One guy says he needs a tool from the truck and
| walks off, and the other guy starts talking to our dog,
| and tells us how he used to train pit bulls, and starts
| doing some weird hand motions and yelling commands to our
| dog like he's casting a spell or something.
|
| I think the guy was probably just not all there mentally,
| like too much former drug use or something. But it was
| one of those surreal moments where red flags were going
| off in my head. I went to find the other guy just to make
| sure he wasn't robbing us out the back. Because that's
| what it felt like: misdirection, social engineering, a
| performance.
|
| In hindsight, I don't think there was anything suspicious
| going on. But the alarm bells in my head were still
| completely real.
|
| When we see this "everything is an plugin" but "plugin
| details are internal-only" and "plugin detail is coming"
| and "1.0 is released" and "but we will have 40 more
| release candidates before 1.0 final" and "you could
| support us with pro" and "you dont need pro" and "we
| don't recommend pro" and "you can build anything in pro
| yourself anyway" and "you shouldn't use this pro feature
| anyway and should use CSS instead", and then when people
| ask a question about any of this inconsistency, we get
| juvenile responses like "don't use it then", "don't buy
| it then", "fork it then", "my time isn't free", and so
| on. Even though there is no scam, it's surreal. Like, "is
| this really happening?" It sets off the same red flags in
| people's minds, _even when there is no scam_.
|
| Datastar seems very cool as a tool, and the developers
| seem very technically competent. The problems they face
| don't seem to be technical problems.
| imiric wrote:
| I do think this is the most sustainable approach for
| monetizing open source projects, _as long as_ the developer
| is fair about it. That is, truly make features that only
| large and /or enterprise users would have a use for, and only
| charge for those, instead of arbitrarily deciding to put core
| features of the software behind a paywall.
|
| In the case of a web framework, that choice is a bit
| difficult. But if the software is fully functional for the
| large majority of users, then charging for niche features, or
| those that are actively discouraged, sounds like a fair
| approach to me.
| jonathanstrange wrote:
| I'm skeptical about this business model because it can
| become worse than proprietary software dependency over
| time. You get lured in by thinking it's open source and
| free, and might end up paying as much as the developer
| wants for essential features a few years later.
| nchmy wrote:
| Except the pro option is not "a few years later" it's
| available in pre-v1 and is a one-time lifetime purchase,
| not a subscription.
|
| And the framework and docs are so small and simple, that
| you can read the entire site in an hour or two, in which
| time you would have noticed the pro features and pricing
| many times.
| jonathanstrange wrote:
| At the risk of repeating myself, I was talking in general
| terms about the _business_ model and the uncertainty
| about the licensing it creates concerning possible
| _future_ features.
|
| I wasn't aware that they are a non-profit organization
| and agree that my remark doesn't necessarily apply to
| them since they're not a business. If the pro
| subscription helps them to maintain the open source
| project without making any profits, then that seems
| alright to me.
| imiric wrote:
| Like I said, it's crucial for the developer to be fair
| about it. Running a sustainable business built on open
| source is entrepreneurship on hard mode. Some companies
| do a better job at this than others, and, unfortunately,
| open source has been abused as a marketing strategy on
| many occasions.
|
| No matter how you look at it, though, any business model
| that enables users to use open source software is a much
| better option for users than any proprietary software.
| There's no comparison. Given the choice, I'd much rather
| use OSS that is eventually rugpulled or enshittified than
| proprietary software, which carries those same risks,
| while also restricting my freedoms from the get-go, and
| having additional risks I might not be aware of at all
| (exploiting my data, security issues, etc.).
| nchmy wrote:
| They're not even running a business on this - its
| literally registered as a 501c3 nonprofit. Its a labour
| of love that theyve shared with the world, and they
| actively tell people that the pro features are
| unnecessary for most projects. If you want those features
| or just want to support the project, the cost is quite
| fair, and just goes to things like traveling to do
| conference talks etc... They are not getting rich off of
| this.
|
| Also, they intend for v1, which will be released soon-ish
| to be essentially the final version of Datastar. There
| wont be a need for much further development. So there's
| minimal risk of "rugpull" or even abandonment.
| imiric wrote:
| That's admirable. They just gained another sponsor. :)
|
| I do think that they should be paid for this work, and be
| able to sustain themselves from it. So I wouldn't be
| against it being a business, or the project having a
| subscription model. The idea of open source being gratis,
| and products in general being "free", has done enough
| harm to the world.
| andersmurphy wrote:
| 100% so many projects have died because they didn't have
| a longterm plan to keep the lights on other than hoping
| for donations and or offering support that no one needed
| (the better the project the less likely you need
| support).
| limagnolia wrote:
| If they are charging for features, those features are a
| business, even if its a nonprofit business. There is also
| precedent for the IRS to consider it unrelated business
| income and to make them pay taxes on it, but that seems
| to be a huge grey area in US tax law.
| withinboredom wrote:
| LOL. What US tax law?
| limagnolia wrote:
| See for eaxmple the Mozilla IRS dispute as an example.
| Mozilla resolved this by putting their money making
| endeavors into a for profit org, which is in turn owned
| by the nonprofit, but the for profit org pays tax on
| their income. https://www.irs.gov/charities-non-
| profits/unrelated-business... See also
| withinboredom wrote:
| My point is that this administration isn't really doing
| much enforcement.
| andersmurphy wrote:
| Yeah it's a weird one people complain about open source
| projects having extra features you can pay for. But, then
| they also complain when you make open source GPL.
|
| I'm sure it would be the same group complaining if it was
| GPL too.
| nchmy wrote:
| This is exactly what is done here. They're emphatic that
| most will/should never need the pro features.
| simonw wrote:
| Looking at https://data-
| star.dev/reference/datastar_pro#pro-features the features
| that stood out for me as things I would want to to use
| (and that don't feel particularly "pro" to me) are the
| animation features, data-replace-url, data-on-resize,
| data-scroll-into-view, the @clipboard() mechanism and,
| most importantly, the debugging tool.
|
| My problem with this business model is that it has a
| chilling effect on open source contributions to the
| project, because it incentivizes the core maintainers to
| _not_ accept community contributions that overlap with
| the paid features.
| nchmy wrote:
| Datastar is currently in the Release Candidate phase of
| v1, which they seem to be certain will be the final form
| of Datastar. So, they're really not looking for
| "community contributions" to the core of datastar, other
| than for feedback to polish it off.
|
| Moreover, ALL of the features are "plugins" - there's
| nothing stopping anyone from building and sharing their
| own. It is actually encouraged. In fact, in their next
| release they'll be releasing and documenting some sort of
| public API for plugins. Not sure exactly how it will
| differ from the current form though, since you can
| already make your own plugins.
|
| They also intend to have some sort of free, open-source
| "marketplace" for community-built web components, based
| on their upcoming Rocket web component and Stellar css
| framework. You would just need to have the Datastar pro
| license to be able to use any of them.
|
| I can see how this final part might be criticized, but it
| does seem quite fair to me. Sustainable open source is a
| big problem - in recent months ive had some important
| fully-open source dependencies disappear - even ones that
| were backed by well-funded companies. Moreover, Datastar
| is registered as a 501c3, and they really don't intend to
| "make money" from all of this. Its just to pay the bills,
| travel to conferences etc...
|
| They're very reasonable people and open to all discussion
| in their discord. Im sure that whatever concerns you
| still have could be explained quickly if you went there.
|
| In fact, i just posted there about this thread and how
| its overflowing with nonsensical complaints about how
| there's no link to or mention of Pro on the homepage -
| they said sure, we'll add a link.
| withinboredom wrote:
| Naming things really is hard. I can't even with these
| names.
| nchmy wrote:
| what's wrong with the names? they seem perfectly fine to
| me...
| nchmy wrote:
| Also, btw, some of these - specifically data-replace-url
| - are strongly discouraged by the devs, to avoid
| footguns. I dont have experience with it, but people have
| spoken lots in their discord about how things like
| Hotwire Turbo are too magical and end up causing a lot of
| issues. Datastar strong recommends just using hypermedia
| as it was designed (HATEOAS
| https://htmx.org/essays/hateoas/) and doing full page
| reloads when you change a page. And for more ephemeral
| in-page changes, you can use the sse fragments morphing
| etc
| foofoo12 wrote:
| > exploring models
|
| This model of using deception to hide costs isn't exactly
| "exploring". It's tried and tested.
| mbvisti wrote:
| you're stretching the definition of deception here my guy-
| what do you want them to do? plaster a big sign on the
| landing page stating that this framework ALSO contains pro
| features that you have to pay for?
| matheusmoreira wrote:
| > what do you want them to do?
|
| > plaster a big sign on the landing page stating that
| this framework ALSO contains pro features that you have
| to pay for?
|
| Yes.
|
| I for one don't enjoy being on the receiving end of these
| marketing dark patterns and manipulation tactics.
| skeeter2020 wrote:
| I've commented above that this seems like a bad approach,
| but it sure feels like a lack of awareness vs. an
| intentional dark pattern. The internet makes it so easy
| to assume the worst but I think this is a case where we
| should start with the most charitable interpretation.
| sudodevnull wrote:
| Dark pattern? Pro plugins are built in the same way as is
| accessible to any user. What's the real issue?
| bkmq wrote:
| That you have to go looking, actively, to realise there
| is a paid option.
| porridgeraisin wrote:
| > plaster a big sign
|
| Yes!! That's table stakes. It's the bare minimum needed
| to not be considered malice.
| sudodevnull wrote:
| Why? What is at stake?
| porridgeraisin wrote:
| Basic decency of being upfront about your business model,
| and in general being upfront and not being deceitful in
| life.
|
| Anyways, constructively, they should add a usual pricing
| page with a nav for that at the top of the landing page.
|
| It makes it clear that something is priced, right on the
| landing page.
|
| In the pricing page the cards _better_ make the costs
| super clear.
| hasanhaja wrote:
| I'm confused. Datastar is a free open source framework
| that you can choose to use or not.
|
| It's weird to call them out as indecent and deceitful for
| not actively marketing features that they really don't
| think you need. Even when you think you need it, they've
| actively encouraged people to analyze their problems to
| identify if it's a real need or a gap in hypermedia
| fundamentals knowledge.
|
| Also, the top nav has a Pro page that has what you're
| looking for.
| bkmq wrote:
| "Ready for liftoff?" should have a go-pro button. That's
| all that is needed.
| hasanhaja wrote:
| Why have a call-to-action to something they don't want
| you to do?
|
| It's only there for Pro users and people who want to
| support the project [1] and not normal use.
|
| [1] https://data-star.dev/essays/greedy_developer
| foofoo12 wrote:
| > what do you want them to do?
|
| The common thing to do today is put a "pricing" menu item
| at the top right. That'd be fine.
| hasanhaja wrote:
| Wanted to include that this is so the development and
| maintenance of Datastar as a project is sustainable. And that
| they are a registered 501(c)(3) nonprofit organization.
|
| https://data-star.dev/star_federation#nonprofit-organization
| nchmy wrote:
| What a weird comment. Why bring this up unless you're just
| trying to make them look bad in a dishonest way? It is clearly
| documented on the site in multiple places.
|
| Moreover, they _actively dissuade_ people from even buying the
| pro license because they are quite emphatic that most people
| /sites do not need any of these features. If you do need them,
| then it's a small price to pay for the functionality, as well
| as to make a modest amount to cover costs for their non-profit
| org. God forbid someone optionally charge something for years
| of effort that they have given away for free...
|
| It also comes with an immensely useful "Inspector" that shows
| all the signals, sse events etc, and will soon come with an
| immensely streamlined web component framework (Rocket) and css
| framework (Stellar).
|
| I bought the pro license mostly just to support them, but the
| inspector is great and I look forward to checking out rocket
| and stellar.
| xdfgh1112 wrote:
| I appreciated it. If I'm going to consider a framework I want
| to know if some of it costs money. Especially like 299usd.
|
| Frankly your response seems very hostile and makes me wants
| to avoid them more.
| nchmy wrote:
| What a world we're living in - I point out that a hostile
| comment is hostile, and I'm labeled hostile.
|
| Once again, they aren't charging anything. Pay them if you
| want some largely-unnecessary features, or if you just want
| to support years of hard work and innovation. That's what I
| did.
|
| But you do you.
| speff wrote:
| If you're amenable to feedback, the impression I got from
| your initial comment was "a hostile comment pointing out
| another hostile comment". It assumed a negative
| motivation on OOP based on vibes and you ran with it.
| Even this comment's parting line:
|
| > But you do you.
|
| - seems like a truism. I get the feeling it's meant to be
| read as "I give up. You can keep whatever wrong viewpoint
| you have".
| nchmy wrote:
| Finally a good-faith reply!
|
| I concede that my original comment here was somewhat
| hostile, but only really the first line. And it wasn't
| even all that hostile - especially when the rest of the
| comment was really just informative and positive about
| datastar.
|
| And, moreover, is standing up to poor behaviour - even if
| done in a somewhat hostile/confrontational way - really
| such a bad thing? It seems quite clear to me that they
| were not communicating in good faith - they didnt come to
| discuss features, philosophy about open source
| sustainability, or actual reality of the messaging on the
| site and their discord server.
|
| Instead THEY are explicitly saying that Datastar's devs
| are being dishonest in some way for having a pro license
| (which, again, they quite clearly say most people should
| not buy) as a way to bring a modicum of sustainability to
| something that theyve dedicated years to and given 99% of
| the value away for free.
|
| They could have said "This looks interesting, but I
| noticed that there's a pro license if you want to get
| some features. Are these features necessary? Is this
| price reasonable? Should we be against there being a
| 501c3 behind this? etc..."
|
| But they did none of that. I think that all that a
| reasonable person can really conclude is that they're
| either the disdainful sort of person who thinks all code
| should be free for everyone, or that they are just
| trolling, or perhaps even that they dont like how
| datastar is challenging the status quo of webdev.
|
| Hence, "you do you" - you interpreted it exactly as I
| intended.
| xdfgh1112 wrote:
| I'm sorry people didn't immediately take to this
| financing model as well as you did. The average person is
| not as invested as you and most people are going to
| immediately switch off if they hear part of the
| functionality costs money and this isn't mentioned
| anywhere on the front page. Doesn't matter how
| "unnecessary" these features are, it's a bad look.
|
| Plenty of other open source projects make money without
| attracting this kind of negative feedback. It's curious
| to me that you suggest everyone is intentionally being
| negative or malicious here, instead of looking at why the
| project caused such a response.
| nchmy wrote:
| People pay for things all the time, why not (almost
| surely unnecessary) code? Why do you all feel entitled to
| free access to thousands of hours of very highly skilled
| devs' efforts (most of which they actually are giving
| away for free)?
|
| Moreover, it is quite common for there to be pro versions
| of libraries these days - tailwind, all sorts of
| component libraries, etc..
|
| > Plenty of other open source projects make money without
| attracting this kind of negative feedback
|
| We dont seem to be living in the same reality. In mine,
| maintaining open source projects is a nearly-completely
| thankless, profit-less endeavour. It is a rare exception
| that someone can earn a living from it. And datastar's
| devs have zero expectation that they'll do so, even with
| this model - hence it is registered as a 501c3, and the
| funds will cover things like travelling to conferences to
| talk about it.
| xdfgh1112 wrote:
| I think the pro version and charging stuff is totally
| fine. It's the lack of transparency that bothers people.
| I shouldn't have to figure out their profit model from HN
| comments. If you want to be paid for your work, charge
| for the whole library or make the free/pro distinction
| very clear to people. Don't try to hook them in with a
| free offering while locking features behind a paywall
| that they discover later.
|
| Or if you want to be altruistic (as you keep referring to
| nonprofit) make it free and solicit donations/patreon.
|
| The current approach is certainly a new one and I am
| interested to see if it pays off.
| nchmy wrote:
| 99% is already free. That seems pretty altruistic to me.
|
| And they don't really care if it "pays off" - it's not
| meant to
| andersmurphy wrote:
| How much do you pay big tech for your LLM subscriptions
| monthly? I'm really curious.
|
| 299$ lifetime which includes future features seems like a
| steal. I bought it and don't use it, but I'm excited to see
| what comes next.
| sarchertech wrote:
| This is an example of the entitled subset of people who come
| out of the woodwork whenever an open source project has any
| kind of monetization or even just a non-standard license
| prohibiting billion dollar companies from selling their
| project as a service.
|
| I guarantee the fact that I referred to a project with an
| anti Amazon clause as open source will piss some of the off
| so much that they'll comment here about it.
| mexicocitinluez wrote:
| op: _copies information from the website_
|
| you: "How dare you!!!!!"
| sarchertech wrote:
| There's a such thing as context and intent which are
| separate from content, and this is directed as much at
| the people who upvoted this particular content to the top
| comment as it is to the OP.
|
| The conversation on this post is now centered around the
| fact that they have some premium features for sale.
|
| Edit: Now there's another post on the front page of HN
| accusing the datastar team of being greedy.
|
| https://news.ycombinator.com/item?id=45537372
| mexicocitinluez wrote:
| > The conversation on this post is now centered around
| the fact that they have some premium features for sale.
|
| Oh the horror!!!!!!
| sarchertech wrote:
| The open core model is great and entitled buttholes, and
| open source warriors discouraging people from doing that
| is pretty horrible.
|
| I mean it's not war in Ukraine horrible but I think it's
| awful that people _expect_ you to work for them for free.
| mexicocitinluez wrote:
| Posting documentation from the site != "people expect you
| to work for them for free."
|
| Really an insane thing to see a comment that informs you
| of pricing for their pro package and have a horde of
| people jump in with "How dare you!!!?!?!"
| andersmurphy wrote:
| Same people who complain about GPL and other copy left
| licenses I imagine.
| skyfantom wrote:
| Didn't find anything about this on the main page.
| sudodevnull wrote:
| Author of Datastar here. Most people don't need pro and it
| seems like putting it on the front page is actually
| marketing it instead of people finding it as the need the
| features. Not only should most people not use the features
| we actively push against it. The only thing that's really
| super valuable is the inspector which is a Dev tool
| nchmy wrote:
| As someone who actually happily bought Pro, I completely
| agree with this. Inspector is great, and worth the
| (nominal) cost of Pro. I _might_ use a couple other of
| the pro functions. I 'm very much looking forward to
| Stellar CSS and Rocket Web component framework getting
| released - they'll DEFINITELY make pro worthwhile, and
| given that they are completely new, there should be no
| qualms about it being purely pro.
| Unai wrote:
| I opened my HN client and saw multiple posts at the top of
| the home page about this datastar thing, with comments like
| yours either very aggressively defending it or praising it as
| the best thing since bread.
|
| Did you forget one of those "full disclosure" thingies at the
| top of your comment?
|
| In any case, I didn't see anything interesting about it, even
| less so after reading OP's useful comment on the pricing, but
| even if I did I would never intentionally use or give money
| to a company that does astroturfing campaigns.
| nchmy wrote:
| Full disclosure: I'm a happy and grateful user and
| purchaser of the datastar pro license.
|
| And it's not a company, it's literally 3 guys who have a
| 501c3 non profit, and actively dissuade people from buying
| the pro license because YAGNI.
| mexicocitinluez wrote:
| > It is clearly documented on the site in multiple places.
|
| Hold up, so then why is pasting THEIR documentation into a
| comment weird?
|
| lol. This is an absolutely insane response to someone simply
| informing the commentors that there is a price involved in
| the pro package.
| nchmy wrote:
| because the implication in this and so many other comments
| is that they're dishonestly hiding something. There was no
| other commentary other than a large and prominent comment
| saying "Watch the fuck out everyone! There be $ hidden in
| there!"
| mexicocitinluez wrote:
| All they did was post the price of the pro package!!!
| yxhuvud wrote:
| Yeah, I have no idea why someone would want to consider this
| over turbo + stimulus
| andersmurphy wrote:
| Because turbo stimulus doesn't let you build a multiplayer
| spreadsheet performantly and realtime in a few hundred lines
| of code.
| Baguette5242 wrote:
| I tried Datastar and it was great, then I saw this kind of move
| and it turned me down immediately.
|
| I don't believe it is the right way to play. A Pro support
| would have been better. Plus the fact that the licensing
| prevent to use the Datastar Pro in any kind of open-source
| project. Very strange move.
| sudodevnull wrote:
| Then don't buy it, you probably need it
| Terretta wrote:
| So if Mozilla had offered to monetize by asking $299 to use
| the <blink> and <marquee> tags that would turn you off the
| rest of the browser? Or do you think you could make text
| blink another way?
|
| Here's how you replace the URL without a page refresh:
| function processAjaxData(response, urlPath){
| document.getElementById("content").innerHTML = response.html;
| document.title = response.pageTitle; window.histor
| y.pushState({"html":response.html,"pageTitle":response.pageTi
| tle},"", urlPath); }
|
| Similar snippets for the other few and you have successfully
| avoided helping fund the framework!
| halfcat wrote:
| > _So if Mozilla had offered to monetize by asking $299 to
| use the <blink> and <marquee> tags that would turn you off
| the rest of the browser?_
|
| I hadn't thought about it, but yes. I say this as someone
| who paid for Netscape Navigator.
| davidwparker wrote:
| 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.
| andersmurphy wrote:
| 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.
| teekert wrote:
| That movie at the bottom makes me want to use it for any next
| project. Gold. "The planet uncomplicanus" :D
| Blahagun wrote:
| 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?
| hasanhaja wrote:
| What's your concern with the paid features?
|
| https://news.ycombinator.com/item?id=45537335
| nchmy wrote:
| they're a 501c3 non profit and they actively dissuade people
| from buying the pro license, because YAGNI. If you want those
| features, or just want to support a genuinely innovative
| framework that people spent years building, you can get the
| license. Its not that expensive and is a one-time purchase.
| sudodevnull wrote:
| it's really a full stack back end agnostic framework. i haven't
| really seen anything like it.
| andersmurphy wrote:
| 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.
| afavour wrote:
| > They have all survived the front page of HN
|
| Right but this says "bring your own backend" in big letters on
| the splash page. So surviving HN isn't really something
| Datastar is doing here.
| nchmy wrote:
| I don't understand what point you're trying to make.
|
| He shared examples of some immensely dynamic apps that are
| running on a potato and survived HN, showing that this
| simplifies things greatly and can scale. Hypermedia-first is
| a very viable, and simplified, approach.
| afavour wrote:
| I think my point is pretty straightforward. Datastar is a
| front end framework. If any frontend framework can't
| survive HN traffic it's doing something wrong in a truly
| unholy way.
|
| Surviving, or not surviving, a traffic influx is a backend
| restriction.
| nchmy wrote:
| And yet, most frontend frameworks barely on even the
| _simplest_ of sites. This is not only well documented,
| but most of them have now moved towards some sort of SSR
| hybrid - at great complexity cost.
| afavour wrote:
| I disagree with "most". 99% of the sites featured on HN
| do just fine.
|
| OP is a talented developer that wrote a backend capable
| of surviving a ton of traffic. Other developers on the
| internet have written backends that cannot sustain a ton
| of traffic.
|
| The choice of frontend framework is separate from both.
| You can write a performant web app that uses React. I'm
| sure you can write one that falls over immediately with
| Datastar.
| andersmurphy wrote:
| Thank you for the kind words.
|
| I think for me the key thing is Datastar lets me keep
| most of my state on the backend, which makes the backend
| much simpler to write. It also lets me do immediate mode
| streaming of the HTML, which again is non trivial in
| something like react without a lot of added complexity.
|
| So it's an enabler in that sense. But, yes it's totally
| possible to write a backend that falls over with datastar
| like any technology.
|
| I also agree, that Datastar does benefit from backend
| experience and if you don't have that experience it can
| to some extent feel like:
|
| "Draw some circles. Now draw the rest of the Owl".
| nchmy wrote:
| That's a fair point.
|
| But I think that the real point that /u/andersmurphy was
| trying to convey was that hypermedia is VERY performant
| because _immensely_ talented C++ engineers have optimized
| precisely this, for decades. The notion that "frontend"
| devs have that the DOM can and must be managed via JS is
| simply ridiculous, and is one of the primary things that
| datastar and hypermedia approaches in general are trying
| to combat.
|
| In fact, he openly states elsewhere how the sites'
| backends are actually done in a deliberately dumb,
| unperformant way, where the backend streams the ENTIRE
| DOM with each sse message, which gets morphed into the
| DOM. He could have done something more granular, like
| streaming only the checkboxes that have changed, but it
| wasn't at all necessary because the dumb way worked well.
|
| Moreover, the SSE streams benefit from immense
| compression ratios because somehow the compression window
| overlaps across messages. Something like 95+%, IIRC.
| afavour wrote:
| > The notion that "frontend" devs have that the DOM can
| and must be managed via JS is simply ridiculous
|
| The idea that UI state should be managed locally is
| ridiculous now?
| nchmy wrote:
| Its interesting, and telling, that that's the only part
| of my comment that you replied to...
|
| Anyway, browsers are built specifically to render HTML.
| And html/hypermedia is specifically meant to manage and
| transfer state. The web has lost its way. If you want to
| read more about this, this free book is a great start:
| https://hypermedia.systems/book/contents/
|
| Or the essays at HTMX https://htmx.org/essays/
|
| Good luck to you
| afavour wrote:
| I don't feel the rest was really worth engaging with. SSE
| is a really interesting technology but again, it's
| frontend agnostic. You can build a great SSE solution
| with any other framework.
|
| I read about approaches like this and I still don't see
| the reason to do them, beyond "because you can" and
| "JavaScript is bad". The separation of data and display
| logic between server and client is a sensible separation
| of concerns. It's the way any non-web solution does it
| and I don't really see what would make the web so special
| that a different approach is worth it.
| nchmy wrote:
| The _entire point_ of frameworks is so that you dont have
| to engage with lower level things... D* makes it
| exceptionally easy to work with SSE and all sorts of web
| APIs.
|
| that's fine that you dont see any reason to use the web
| as it was designed to be used. But I dont see any reason
| for me to engage any further with you.
| array_key_first wrote:
| You do it to reduce complexity.
|
| The problem with JS heavy frontend is you now have TWO
| applications. The real application, on the backend, which
| makes all the decisions, and the frontend application.
|
| You have TWO states which are being mutated independently
| that you now have to sync.
| znort_ wrote:
| reducing complexity is important but is hardly the
| fundamental reason to choose between server side or
| client side rendering or state management. that just
| depends on the nature of the problem and the context it
| has to be solved in. sometimes it doesn't matter, then
| you have a choice.
|
| you guys are furiously arguing (and not really listening)
| about this or that hammer being good enough to treat
| every problem as a nail, like ssr was the "holy hammer".
| well, it isn't and not every problem is a nail, and while
| datastar looks excellent to me i simply would have no use
| for it if i needed client side logic or state for
| whatever reason.
| andersmurphy wrote:
| Why? What's stopping you putting some state on the client
| with datastar. Just because it's discouraged doesn't mean
| you can't.
|
| It has a whole client side signal system.
| znort_ wrote:
| interesting! i wasn't aware of that, thanks for pointing
| it out.
|
| to be clear, my point was that where the state has to be
| managed is more often than not an architectural decision
| given by the requirements, and the choice of tools should
| be a consequence of that, not a precondition.
| array_key_first wrote:
| I agree, but the kicker is that most websites can be
| server side rendered trivially. Most web "apps" are not
| applications. They are forms and pages.
|
| The client side logic is, usually, just to make the
| developers happy because developers love complexity.
|
| Obviously there are many exceptions. But not every
| application is exceptional. We all hate to admit we're
| working on simple or trivial things but... We are. Often.
| anthonylevine wrote:
| >This is not only well documented
|
| Please, I'm begging you to share this "well documented"
| fact that most frontend frameworks barely "handle" on the
| simplest of sites.
| nchmy wrote:
| Certainly! Here's a good start (React is the main focus,
| but it extends to many other frameworks)
|
| https://infrequently.org/2024/11/if-not-react-then-what/
| (there's MUCH more at this site as well)
|
| https://www.zachleat.com/web/react-criticism/
| albedoa wrote:
| The HN comments for that first one gave us the worst
| "advice" that this site has ever seen and might ever see
| [1]:
|
| > Nothing that is visible "below the fold" should ever
| run or load until the page is scrolled down by the site
| visitor.
|
| The commenter septupled down and eventually blamed trolls
| :D
|
| 1. https://news.ycombinator.com/item?id=42285326
| nchmy wrote:
| Sorry, I'm not understanding what relevance some HN
| comments have to do with the link I shared...?
|
| Though, for the record, I agree with everything that
| person - and other sibling commenter - wrote. It is quite
| obvious the people were not reading and replying in good
| faith.
| albedoa wrote:
| Okay! That is a wild thing to admit!
| markusw wrote:
| It's a frontend framework and a backend SDK in multiple
| languages, for SSE and more.
| sudodevnull wrote:
| Data star is a backend agnostic backend framework that
| happens to have a 10kb on the frontend. You should
| probably read the guy before coming to conclusions on
| what it is
| andersmurphy wrote:
| Sure. You're not wrong. I'd argue Datastar's fat morph model
| is what lets me write a much simpler backend that's amenable
| to batching/better compression. It's also fast enough on the
| client that this immediate mode style rendering of HTML is
| actually possible.
|
| I'm also not doing anything fancy on the backend, I'm using a
| dynamic language not known for it's speed (Clojure). Really,
| most of the work here is being done by SQLITE, batching, and
| brotli compression, which you can all use from any language.
|
| I will concede that languages with access to real threads
| (GO, JAVA, C# etc) do better out of the box for this kind of
| CQRS architecture.
| miroljub wrote:
| [flagged]
| andersmurphy wrote:
| It's global multiplayer, you can see everyone changes
| simultaneously. There's no client side state for the
| checkboxes they are all on the server.
| jakewins wrote:
| The whole point of this framework is that a ton of the logic
| remains on the backend, with live connections to the
| frontend. At least for me the performance and hosting cost
| implications of that was the first question that came to my
| mind when I looked at this, I don't understand how answering
| this question isn't relevant here.
| dang wrote:
| Can you please not post like this here? It's against the site
| guidelines: https://news.ycombinator.com/newsguidelines.html
| miroljub wrote:
| You're right. Sorry, can't delete the comment now.
| emschwartz wrote:
| 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.
| nchmy wrote:
| I don't know about a detailed comparison, but datastar
| basically does everything those do combined, but in a smaller,
| simpler package.
|
| It also sticks to web standards as closely as possible (whereas
| htmx is trying to propose it's api as web standards).
|
| It also has SSE, idiomorph, and more baked in by default
| whereas those are optional extensions in htmx.
|
| They're also releasing css and web component frameworks/tools
| soon that look VERY powerful and simple.
|
| Datastar has the potential to completely change web
| development.
| teekert wrote:
| It sounds like some form of Event Sourcing? I didn't get much
| technical details from the page, and the (otherwise excellent)
| movie.
| nchmy wrote:
| It can be, but doesn't need to be. It's highly compatible with
| cqrs and event driven in general, usually done with sowmthing
| like a pubsub event bus (NATS is most often used). Whether you
| want to go all the way to event sourcing is up to you - it's
| completely agnostic as to how you do your backend.
| Mizza wrote:
| 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.
| Alifatisk wrote:
| I can't use Phoenix with Rails now, can I?
| nchmy wrote:
| What here has been reinvented? There's nothing out there like
| datastar. Htmx + alpine is similar, but much heavier and less
| functional.
|
| And God forbid someone try to make open source sustainable by
| charging for largely-unnecessary functionality and actively
| dissuading you from buying it - as the devs do regularly in
| their discord.
|
| And phoenix doesn't work with ANY backend language or
| framework.
| hasanhaja wrote:
| Simple features? Making those imperative APIs declarative is
| not very simple for me, but you're welcome to not use those
| features and write them yourself.
|
| A couple of things on the Phoenix point:
|
| - Requires the adoption of Elixir and Datastar is backend
| agnostic - Adopting Phoenix feels more suited to greenfield
| projects, but Datastar is suited for that and brownfield ones.
| - Websockets vs Server Sent Events has been really interesting
| and nuanced
| TeddyDD wrote:
| In what specific areas Phoenix Live View is so far ahead? Do
| you mind elaborating?
|
| The unfortunate disadvantage of Live View is that you need to
| write Elixir. A lovely language, but it would be hard to sell
| in company that use only <SOME_LANGUAGE>. The hypermedia
| libraries like d* and htmx can be used with any backend.
| mawadev wrote:
| 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...
| cjs_ac wrote:
| I'm using HTMX and had never heard of Datastar until today. I
| imagine there's a fair few people who saw the first post,
| looked into it and found other things about Datastar, and
| decided to post them.
| nchmy wrote:
| This and other negative, yet argument-free, comments about
| datastar are what seem unnatural to me...
| penultimatename wrote:
| I thought the same before I saw your comment. Several posters
| are new or have also posted on previous posts about Datastar
| (and are oddly aggressive.)
| evilduck wrote:
| Yeah, why does hypermedia attract folks who always sound so
| aggressive? It's a weird but common theme.
| sarchertech wrote:
| That's a common HN pattern. Someone posts something about "why
| I switched to x" and it inspires someone else to link to the
| the x website, or even to other similar projects websites, and
| they all make it to the front page. It's just a common
| synergistic phenomenon.
| dang wrote:
| 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'...
| andersmurphy wrote:
| If the datastar team was capable of such a coordinated
| marketing effort I doubt they'd be in the business of running
| a non profit, or building a niche HTML streaming framework.
| Or having a one off purchase model for pro.
|
| I mean unless you consider me linking my dumb demos everytime
| someone accuses hypermedia of not being suitable for
| realtime/collaborative apps. That I'm 100% guilty of.
| ksec wrote:
| One submitted by me, and this one by others, both accounts are
| ~2012. Not exactly new account.
| philipallstar wrote:
| 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?
| nchmy wrote:
| You can use datastar with ANY backend and templating system
| that you want - you just have to return html with the
| appropriate (and standards-compliant) attributes and,
| optionally, js expressions.
|
| Use php, python, rust, or anything else that you want. They all
| have various approaches to html templating.
| markusw wrote:
| For Go, something like gomponents [0] or Templ [1] would fit
| that. (Disclaimer: I wrote gomponents.) I even have a Datastar
| integration now. [2]
|
| [0]: https://www.gomponents.com
|
| [1]: https://templ.guide
|
| [2]: https://www.maragu.dev/gomponents-datastar
| philipallstar wrote:
| Thanks - interesting! I was more thinking of a workflow where
| a designer makes a component in Figma, and it's probably
| polished and made available in a component library by a
| frontend/UI person, and it's probably a React component or a
| Web component. I was wondering whether that workflow was at
| all compatible with any of the non-JS backends that are
| reclaiming frontend a little.
| sudodevnull wrote:
| And gomponents is great!
| imiric wrote:
| 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
| nchmy wrote:
| I was just commenting to someone yesterday how it's a testament
| to how refined this is that he's been working hard for over 2
| years to produce such a small amount of code. I can only
| imagine how many variations he's gone through in order to get
| to what we see today - a refined, simple, easy, powerful way to
| do SSR-driven declarative interactivity, etc
|
| And if that isn't enough, he's also on the cusp on releasing a
| web component framework that puts Lit to shame, AND a css
| framework that looks equally impressive.
|
| He takes some getting used to, but the guy is a genius and is
| enormously generous with his time and deep knowledge.
|
| I really do hope that d* gains more traction - the web could be
| such a better place, just at a time when native apps are
| literally under assault and censure by app stores and
| autocratic governments.
| imiric wrote:
| > it's a testament to how refined this is that he's been
| working hard for over 2 years to produce such a small amount
| of code.
|
| In the words of some famous people:
|
| > Simplicity is a great virtue but it requires hard work to
| achieve it and education to appreciate it. And to make
| matters worse: complexity sells better.
|
| > Perfection is achieved, not when there is nothing more to
| add, but when there is nothing left to take away.
|
| I think Delaney definitely follows these principles, which is
| refreshing to see in modern web development. The author of
| htmx, Carson Gross, also deserves a mention.
|
| > And if that isn't enough, he's also on the cusp on
| releasing a web component framework that puts Lit to shame,
| AND a css framework that looks equally impressive.
|
| Ah, I wasn't aware of that. I'll keep an eye out for those. I
| see they're also opposed to Tailwind, which is an absolute
| abomination IMO. I don't have experience with Lit, but it
| seemed like a nice abstraction over core Web Components,
| which feel like a half-baked solution.
|
| Ideally, I want these things to be part of core web
| technologies, and for web developers to not need to rely on
| 3rd-party frameworks. Web browsers should be better. Web
| servers should be better. The entire web development and user
| experience should be simpler, more secure, robust, etc. But
| given that large corporations dictate what that experience is
| like, I'm glad that we have fresh thinking from people who
| are not already engrained in this system. While the ecosystem
| catches up, I would use anything they produce, or build my
| own[1], over using established and popular technologies any
| day of the week.
|
| [1]: https://github.com/hackfixme/miu
| nchmy wrote:
| Yeah, i'm a big fan of his/theirs.
|
| > Ideally, I want these things to be part of core web
| technologies, and for web developers to not need to rely on
| 3rd-party frameworks.
|
| This seems to be his prime directive. Everything is
| standards-based. Moreover, if Datastar evolves at all in
| the future, it'll probably be because the web has improved
| and made parts of it redundant.
|
| To clarify, he's a big fan of tailwind as well. But thinks
| that it is solving a problem that doesnt really exist
| anymore due to modern css. Im excited to see it, because i
| also think Tailwind is an abomination.
|
| You can read more about stellar css and rocket web
| components in their respective channels in their discord
| https://discord.gg/bnRNgZjgPh There's some VERY cool sneak
| peeks there. You seem like the sort that would fit in very
| well there
|
| (ps, stellar and rocket are used on their website already.
| Just read source to look at it)
| basro wrote:
| Hey, I'm curious about the web component framework and css
| framework you mentioned. I was unable to find info about it,
| could you link me?
| nchmy wrote:
| THeres not much on the site yet, as he's still baking it.
| https://data-star.dev/reference/datastar_pro#stellar-css
|
| But theres rocket and stellar channels in their discord
| where there's sneak peeks. VERY cool stuff
| https://discord.gg/bnRNgZjgPh
| replwoacause wrote:
| Too bad it will only be available as a Pro feature. I'm
| not against supporting hard work by any means but framing
| it as an alternative to free options set me up for a bit
| of disappointment. But I agree with everything else you
| said that this seems very impressive.
| nchmy wrote:
| Sorry, I had no intention to frame it as being free. Fair
| point though.
|
| Do check it all out though - it's a breath of fresh air.
| replwoacause wrote:
| No worries. I really dig all of this and think D* is a
| great product. Looking forward to seeing what else comes
| out.
| markusw wrote:
| Thank you for sharing the youtube links in particular! It's
| nice to get some background info and intent for interesting
| libraries.
| Imustaskforhelp wrote:
| 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
| sarchertech wrote:
| The problem is that a small company still needs to provide
| support from their own very high cost of living country.
|
| $5 doesn't cover the cost of you filing a single support
| ticket.
| Imustaskforhelp wrote:
| I understand it sincerely.
|
| Is there some middle way that I could use these datastar
| attributes/paid offerings via lets say 5$ but I wouldn't get
| support from the team itself.
|
| I think that they might have a discord server as well and so
| I am more than okay to take support from the community itself
| if I can be honest...
|
| Simply because like me and others, we simply can't pay 299$
| when we don't require support.
|
| Could another tier be created that allows people to use it
| but just without any official support in the sense that maybe
| you could create github issues or something about it but
| don't expect mission critical of sorts...
|
| I hope you can see things from my perspective as well & I
| know some companies / projects which also do something
| similar where they offer support seperately / at a higher
| price but using the product itself doesn't cost you / costs
| you very little and you can always use unofficial-ish help.
|
| What are your thoughts? Do you think that datastar could
| integrate something like this?
| nchmy wrote:
| they do have a discord server, and it is full of excellent
| conversation. But I expect that you would receive a similar
| response to what we've given "sorry, but no. But, also, you
| dont actually need the pro features. Build with the free
| version and profit from it"
| sarchertech wrote:
| There are so many issues with doing something like this
| that it's almost never going to be financially viable for
| small companies.
|
| - Some jurisdictions require some level of warranty,
| extended refund periods, or limit your ability to avoid
| liability for product defects.
|
| - You need to spend time doing research to set prices for
| each country or region.
|
| - You need to combat fraud from people trying to buy your
| product using a VPN from low cost regions.
|
| - This one is a big one. Chargebacks tend to be higher from
| low cost of living countries. Payment processors will drop
| you if your chargeback rate gets too high. Risking a $25
| chargeback fee and being dropped from your payment
| processor for $5-10 payments is often not worth it.
|
| - There are only 20 million professional software
| developers in the world. If you say half of those are web
| developers and you are phenomenally successful and 1 out of
| every 1000 web developers in the whole world buys your
| software. That's 10k sales. At $5 per sale that's $50k
| revenue across the entire life of the product. $50k for a
| team of people isn't a financially viable endeavor.
| Imustaskforhelp wrote:
| Yeah I was thinking about it and I get it why regional
| pricing might not make sense for a product like this...
| Its complicated and well, it would also hurt the
| developers actively as well of sorts. So I don't really
| expect them to do such
|
| Now, regarding 5-10$ payment, suppose we do a 20$ payment
| one time donation, they are a non profit so they can
| definitely do fiscal foundation but I can get it why you
| might not want to do that
|
| I was discovering more about chargeback and other things
| like taxation as well
|
| I found polar.sh could be a decent approach to a lot of
| these problems, just create a polar.sh set account and
| they have a github thing as well where you can allow
| access to any git private repo to anyone who pays and
| even a discord integration so you could have support
| through there out of the box
|
| I think the same can be done through patreon or the likes
| as well from what I know
|
| all I was trying to say was that yes I agree with your
| comment and I thought about it and the other comments
| regarding how 5-20$ wouldn't cover support but what if I
| don't need support, I just want the code and I can take
| the support through their discord server/like minded
| people?
|
| I understand, I truly do, currently I read more about
| datastar, I have come to the conclusion that they are
| somewhat not necessary in the sense that I can have
| sse.ExecuteScript(`console.log("Hello from server!")`)
| and I think that it could be integrated with something
| like gsap if someone wants to hack through a animation
| thing without modifying datastar library itself as well
|
| I still believe though that they should atleast give
| another optional method imo where someone can pay 20$ as
| an example to get the template of sorts but no support
| and using something like polar.sh or patreon or stripe
| with MOR, it should be pretty easy and well they have to
| realize that there might be people who genuinely can't
| afford this as well I suppose y'know?
|
| I am genuinely curious what your thoughts are on why/if
| they can add a 10-20$ tier which just gives access to the
| code and no (official) support through github
| sponsors/patreon/polar.sh and the likes?
|
| And maybe if someone needs support but can't afford it,
| maybe optionally they could ask it into their server so
| that like minded people could volunteer to help as well
| in the process?
|
| What are your thoughts?
| nchmy wrote:
| This is the only valid and reasonable criticism I've seen here
| so far, kudos to you.
|
| 299 is, indeed, inaccessible for many people. But, the devs
| live in places where things cost more, so its also a tiny price
| compared to the relative value that they provide.
|
| I do think that some sort of geo-relative pricing structure
| would be worth looking into, but how does one even implement
| something like that? Is there something that makes it all "just
| work"? I suspect not. Moreover, the devs have already given
| away so much of their time - it doesnt make much sense for them
| to invest even more of it into designing a pricing system like
| this, from which they are going to possibly earn only a
| negligible amount from. Perhaps this is a problem that you
| might like to address yourself?
|
| Anyway, the devs are very clear that most people should never
| need the Pro license. 95+% of the functionality and value is
| available for free in the open-source library. Use it, enjoy
| it, learn from it, profit from it!
| markusw wrote:
| What I've done in a project once is use Purchasing Power
| Parity: basically, there's an index for purchasing power, and
| you adjust your pricing based on that. It's implemented in
| some major payment platforms, like Gumroad:
| https://gumroad.com/help/article/327-purchasing-power-parity
| nchmy wrote:
| Yeah, something like PPP seems to be the way to do it. But
| it seems non-trivial to implement in reality. Gumroad
| consequently charges 10% fees.
|
| I think it is very unlikely that Datastar would implement
| something like this - but just as a matter of limited time,
| rather than lack of empathy with the situation.
|
| Still, people are welcome to bring it up in their discord -
| perhaps they will actually do it!
|
| And i say all of this as someone who lives in central
| america, and am building a nonprofit project for which i
| have zero funding assistance. I already bought the pro
| license (which is 60% of my monthly cost of living...),
| mostly just because i see huge value in it all and wanted
| to support them.
| sudodevnull wrote:
| Datastar author here, neat idea. Join the Discord and talk
| to us about how to implement. We're just a few guys and
| just don't have the cycles to explore every option for
| every facet of the project. Some of this is pure overhead
| Imustaskforhelp wrote:
| Oh wow, glad that somehow my idea of purchasing power is
| implemented by something like gumroad
|
| I had checked literally everywhere including even thinking
| what if the devs publish it on steam or epic games but that
| would be weird and steam for example takes 30% cut
|
| I had forgot to check out on gumroad but today I learnt
| something new thanks to you so thanks!
|
| It seems that the dev of data-star have also commented on
| this and it would be lovely to see if they could implement
| this or any other ideas that I or the community is stated,
| it is nice to hear that they are taking feedback which is
| really nice!
| throwup238 wrote:
| _> Is there something that makes it all "just work"?_
|
| Stripe?
|
| You can geolocate via IP as a first pass for the frontend,
| check the card's country code for the order, and then the
| billing/shipping/account address if it's really that
| important (like when your service has different costs
| depending on locality).
|
| I'm sure there are services that can handle it for you but
| it's so simple to implement price discrimination to whatever
| threshold you want that I've never checked. The hard part was
| always figuring out the false positive/negative rate and the
| frontend flow when the different steps disagree on location,
| but those are edge cases that don't really matter with zero
| marginal cost digital goods.
| contrast wrote:
| I pay for a lot of software eg I used Screen Studio a couple
| of times, liked it, dropped a couple hundred bucks for it.
| Good work from a solo dev.
|
| Datastar have basic functionality in the pro license. Basic
| UX capabilities like animation and copy to clipboard.
|
| The devs aren't "very clear" that most people should never
| need the license. That's just PR. They've picked a bunch of
| features that even a teenage hobbyist might want to use as
| part of a trivial application. There's no relationship
| between the locked features and their value or complexity.
|
| I would avoid any web framework that might get in my face
| like this, at some random moment working on a pet project to
| try out a new thing, with an invoice demanding payment if I
| want to use random features.
|
| "Perhaps this is a problem that you might like to address
| yourself?"
|
| No I'm good, thanks. The Datastar community needs some work,
| going by the attitude of their defenders in this thread.
| Someone else is saying the way they charge money isn't a
| monetization strategy. It's nonsense.
|
| Nothing wrong with charging money. Just be honest about it,
| take it in the chin when people don't want to buy, and
| ideally have a pricing strategy that makes sense.
| nchmy wrote:
| They literally don't care if people want to buy it. They
| tell people not to. So there's nothing to take on the chin.
| HiPhish wrote:
| > 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
| nchmy wrote:
| congrats, you have described external dependencies
| esjeon wrote:
| 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.
| NaomiLehman wrote:
| Doesn't Astro solve this already?
| sudodevnull wrote:
| Not in the slightest
| sudodevnull wrote:
| Datastar author here. Yes nothing is new here, that's kind of
| the point. You seemingly lost her way with jQuery which was
| just sprinkle on the page but then spa wasn't interesting
| approach at reactivity while missing all the points of the back
| end controlling most the state. I'm not trying to be innovative
| I'm just trying to get us back to some normalcy
| masfoobar wrote:
| Seems interesting.
|
| I don't think its going to make me swap from htmx, though. We
| shall see.
| oulipo2 wrote:
| 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?
| andersmurphy wrote:
| 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.
| chuckadams wrote:
| 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.]
| nchmy wrote:
| > sounds like a fast ticket to a hard fork.
|
| Indeed! Could you do us all a favour and fork the pre-pro
| plugins and make them compatible with the current iteration of
| d* pro? They're all like 50 LOC, after all, so should be
| simple.
| chuckadams wrote:
| Were I so inclined, I'd make them compatible with non-pro.
| And more likely just take my fork in whatever direction I
| cared to, just keeping the wire format compatible (and likely
| negotiable). But it's a project best left for people actually
| using Datastar, not curious onlookers like me.
| nchmy wrote:
| Given the simplicity of doing such a fork, and that no one
| has done it yet, perhaps this is a non-issue?
| jopicornell wrote:
| Same as my other comment, it seems like you are involved
| in the project. Stop responding like this is facebook or
| reddit. Here we offer our expertise with all good
| intentions. They haven't said it is a simple task, you
| are assuming that they said that.
|
| If you can't take constructive criticism or even respond
| to opinions you disagree, then it is better to not
| respond at all, because it is bad PR.
|
| I understand that maintaining a project like this is
| hard, that you need to be compensated and that open
| source corporate usage tends to be disgraceful. But
| that's not what they are telling you. They are just
| shating their opinion, which is part of your potential
| customer opinions.
|
| Share the rationale behind paywalling common features.
| Give us, if you have to respond, why you hide the pro
| features off the homepage, etc. Instead of this kind of
| childish reaction that adds nothing
| nchmy wrote:
| I'm a user of datastar, nothing more. And I'm defending
| the developers against all of the baseless slander here.
|
| And now Im forced to defend myself against your baseless
| slander. If you cared to read, you'd see that _I_ said it
| was a simple task to update the pre-pro versions of the
| tiny plugins to be compatible with the current api,
| because it would be. And they replied on that basis.
|
| The rationale has been shared many times - here and
| elsewhere. And the pro features are not "hidden" -
| they're right there in the header. And it's not for any
| nefarious reason - precisely the opposite, in fact. They
| don't want to appear to be flogging something. Similarly,
| they don't advertise any of the pro features as being
| free, anywhere.
|
| But, I brought this all up with the devs earlier and
| suggested they add a small link or banner or something to
| the pro license and they said they would. But not because
| it's a good or necessary idea, but instead just so all
| the trolls won't have even the wobbliest leg to stand on
| in the future on this topic.
|
| Please take some constructive criticism - you have no
| idea what you're talking about here, in any regard. It is
| childish. Please inform yourself in the future,
| especially when you want to try to correct someone.
| sudodevnull wrote:
| Please do! I highly recommend doing that, PLEASE FORK
| jopicornell wrote:
| I have already seen a few of your responses to criticism
| coming up toxic like this. They don't need to fork it, but
| some of your potential customers could. They are explaining
| to you their opinions, and in HN, this is very valuable.
|
| Most of us have some decision at companies, which are your
| real customers, and criticism like I've seen you respond
| boldly and badly, is the criticism I think you should review
| and take into account.
|
| Personally, I like everything of the pro, except the features
| that you decided to exclude. Doesn't seem pro features, but
| features you ramdomly decided not to open source them, and
| that could be ok. But instead of doing it like this, maybe
| put a restrictive license so that companies with more than 5
| people have to pay.
|
| But I think you should focus on premium/pro features that are
| really a plus, like your debugger, the bundler, etc. And find
| features that aren't common and give a plus.
|
| And it is an opinion which you may disagree with, but if you
| respond to me, don't do it like that, because to me, it is
| not professional and I'll tend to avoid doing business with
| people that respond like that
| kitd wrote:
| "Hobbling" is too strong a word. There's a handful of
| attributes and events that are only available in Pro and none
| look fundamental to the operation of most sites [1]. In fact
| they could all probably be replaced with a bit of custom JS
| sent up from the server.
|
| [1] https://data-star.dev/reference/datastar_pro
| azemetre wrote:
| Is there documentation on how they made that slick Star space
| animation on the front page? Very cool and retro looking
| sudodevnull wrote:
| It's just a basic 1kb web component driven by datastar
| attributes
| azemetre wrote:
| Do you have a link to the web component? I can't find the
| site code anywhere on their github org.
| dang wrote:
| Related ongoing thread: _I switched from Htmx to Datastar_ -
| https://news.ycombinator.com/item?id=45536000 - Oct 2025 (223
| comments)
|
| There is also https://news.ycombinator.com/item?id=45537372,
| which I'm trying to figure out what to do with (bear with me...
| edit: ok, I found a place to merge it:
| https://news.ycombinator.com/item?id=45536535)
|
| Previously:
|
| _Datastar: Web Framework for the Future?_ -
| https://news.ycombinator.com/item?id=43655914 - April 2025 (155
| comments)
| joshdavham wrote:
| Thanks dang!
|
| Question also: do you somehow keep a "mental catalogue" of
| related articles or do you use some tool to find these?
| dang wrote:
| Mostly I just use HN Search but in a sped-up way that relies
| on a browser extension.
|
| https://news.ycombinator.com/item?id=44861185 (and the other
| stuff linked from there) has more details
| sigmonsays wrote:
| as a newb, does datastar work on mobile?
|
| Most web pages I try to build never look right on firefox on
| android.
| pst wrote:
| 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.
| GiffertonThe3rd wrote:
| 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.
| didip wrote:
| Anything that's using server side rendering gets my vote.
|
| But isn't HTMX+Websocket basically the same as datastar?
| replwoacause wrote:
| Mine too. I've been playing with this lately
|
| https://www.zjax.dev/
|
| And I like what the author is doing
| nchmy wrote:
| Not at all, for many reasons.
|
| HTMX doesn't do any client side interactivity. You need
| something like alpinejs for that. And alpine doesn't have
| signals, which are super useful (when used judiciously)
|
| Datastar uses sse rather than websockets, which is simpler and
| more compatible http,web standards etc. Htmx can use either sse
| or ws, but both are a separate plugin.
|
| Consequently, datastar does much more than htmx+alpine+ws/sse,
| in a fraction of the js size.
|
| Htmx (and alpine, I think) introduces it's own html attributes
| whereas datastar uses spec-compliant data-* attributes (hence
| the name)
|
| Htmx's api is much more complicated due to all of the extra
| attributes. Datastar is more concise.
|
| Datastar has backend SDKs for all popular languages, to make it
| easy to send html fragment and signals updates via sse.
|
| There's lots more as well. Very worth checking out.
| melasadra wrote:
| Is there a good Datastar tutorial creating a small project that
| shows off Datastar's strengths and how the DX feels like?
|
| I saw the game of life and checkbox examples but I've never used
| Clojure
| nchmy wrote:
| datastar is backend agnostic - you generate the html however
| you want.
|
| you can check out this repo if you want to see a simple golang
| implementation. https://github.com/zangster300/northstar
|
| And all of the sdks have some simple examples.
| https://github.com/starfederation
| andersmurphy wrote:
| Yeah. That's the real rug pull all my code is in Clojure. Which
| is rough if you're not familiar with reading lisp.
|
| There's a few examples in typescript and go floating around.
|
| Here's one:
|
| https://github.com/Mortalife/datastar-chat-example-ts
| JSR_FDED wrote:
| Datastar is run by some principled (and opinionated) guys who are
| immensely generous with their time and supportive to newcomers.
|
| What's getting lost in the whole kerfufflw over the Pro version
| is that this is NOT a monetization strategy. There is no intent
| to hook you - in fact they go out of their way to tell your you
| don't need it. And the company is a registered non-profit.
|
| Based on their own extensive experience they know which tiny set
| of features are likely to appeal to a very small group of people
| and at the same time are likely to incur the vast majority of
| support burden. By keeping these features out of the core they
| keep the base product simple and universal.
|
| It is in fact an innovative and fair way of (a) signaling that
| these features are likely footguns, (b) getting just some of
| their costs covered by the people who either need the most
| support or are getting so much value from Datastar that they're
| paying, (c) thereby freeing up their time to spend on the larger
| community.
| esperent wrote:
| data-animate - Animates element attributes over time.
| data-on-resize - Runs an expression on element resize.
| data-scroll-into-view - Scrolls an element into view.
|
| If these are footguns then they can't be designed very well. I
| also don't think you can say that they'd only appeal to a small
| group.
|
| I don't have any problem with them charging for whatever they
| want to. But let's not make up excuses.
| andersmurphy wrote:
| 1. You should be using CSS for animations
|
| 2. You should be using data-on to listen to the window level
| resize event (which doesn't require a pro plugin).
|
| 3. Scroll element into view can be replicated with data-on-
| load="el.scrollIntoView()"
|
| The main benefit of pro is supporting the project.
| HiPhish wrote:
| > You should be using CSS for animations
|
| CSS can only animate appearance, not HTML attributes like
| the `value` of a `<meter>`
|
| > You should be using data-on to listen to the window level
| resize event
|
| That event is fired when the window is resized, not when an
| element is resized
| contrast wrote:
| Copy-to-clipboard is a support heavy feature?
|
| Do you really think Datastar is of such ridiculously bad
| quality that even simple features require a lot of support to
| get working?
| hasanhaja wrote:
| Use the Navigator API directly then? Why do _need_ a
| declarative version of it?
| barapa wrote:
| I implemented copy to clipboard in datastar in maybe 1
| minutes with an AI agent. What exactly are you providing to
| the world for free?
| pragmatic wrote:
| Are we back to asp.net webforms?
|
| Manage all state in the server?
| pragmatic wrote:
| Yes we've come full circle.
|
| Sending chunks of html from the backend and updating only parts
| of the page is what webforms did 20ish years ago.
|
| I'm trying to figure out what the appeal is here?
| d--b wrote:
| so all the UIs I work on have some form of pivotable grids
| handling some decent quantity of data (several 100k rows)
|
| Obviously in react I can find components that work fine.
|
| But is that something datastar can deal with well, or is this
| something where I'd need datastar and some frontend js?
| replwoacause wrote:
| I like what https://www.zjax.dev/ has done
| est wrote:
| <input data-on-
| input__debounce.200ms="@get('/examples/active_search/search')" />
|
| seems a little crazy, why can't we use traditional methods like
| this?
|
| <input
| oninput="debounce(0.2).get('/examples/active_search/search')" />
|
| just an idea
| webcoon wrote:
| Docs mention absolutely nothing about offline use, service
| workers, or PWAs. How am I supposed to build a modern web app
| with that? Rely on always having internet?
| hu3 wrote:
| > Rely on always having internet?
|
| Yes? Very few cases need offline capabilities. Why complicate
| things unnecessarily?
| nchmy wrote:
| I'm extremely interested in this sort of use case and am
| regularly disappointed to find that very few others are. And
| even fewer are interested in doing it in a hypermedia-first
| way.
|
| There's two ways this could be approached.
|
| 1. Just cache the backend-generated html that has datastar
| attributes in it, and serve it from a service worker. Datastar
| library in the main thread won't know or care whether it came
| from service worker, edge worker or your backend.
|
| 2. If there's a need for dynamic data/templating (eg user-
| specific into), you can do so in the service worker - if you've
| stored the templates and data already. But that has little to
| do with datastar - you'd have to do that in any case.
|
| However, service workers have limitations with regards to
| things like dynamic script imports, using es modules etc. You
| can send messages to a dedicated web worker which handles
| rendering and returns the html, but it does get complicated.
| Sharedworker would be even better but android chromium still
| doesn't support it - but they're finally trialing it and
| hopefully it'll be available in 6 months.
|
| The only datastar-specific consideration is if you want to do
| something like stream sse events from the "backend" to the
| datastar library in the main thread/dom. The
| TypeScript/JavaScript sdk works just fine in the service worker
| as well, and can maintain a long-lived connection to
| periodically stream new messages. Of course, service worker
| lifecycle is somewhat of a black box and out of your control,
| but that has nothing to do with d*.
|
| So, overall, yes you can use datastar offline. But it comes
| with all the issues that you'd face with another approach.
| rrgok wrote:
| It amazes that we are a still solving low level problems for CRUD
| applications. No, you cannot develop highly interactive non CRUD
| app with Datastar/HTMX/Unpoly.
|
| We need higher level abstractions and solutions. How the client
| and the server communicate is still low level for developing
| apps, more so CRUD apps.
___________________________________________________________________
(page generated 2025-10-11 23:01 UTC)