Doesn't using something like hx-preserve effectively make it an SPA? It makes an AJAX request and replaces part of the DOM. What's the difference?
How a hypermedia approach can address usability concerns with multi-page apps
51–60 of 136 posts
Re: How a hypermedia approach can address usability concerns with multi-page apps
#52Can anyone recommend a good resource for comparing htmx with alpinejs? I’ve seen them both mentioned here but their differences are not clear to me.
hyperscript, our other project, is a more direct competitor w/ alpine:
Re: How a hypermedia approach can address usability concerns with multi-page apps
#53Re: How a hypermedia approach can address usability concerns with multi-page apps
#54Earlier quoted context omitted.
No, the entire point of borrowing the term transitional is "having the best of both worlds". The SPA/MPA comparison is about highlighting the best aspects of each method and envision ways of implementing both. Any decent framework nowadays can be used to implement "transitional" features, so HTMX using this as a way to plug their own is lazy and annoyingly counterproductive in this particular discussion.
we were asked multiple times for a response to Mr. Harris' talk, and so we gave one i think you are missing the hypermedia vs. RPC aspect of the discussion, and the javascript-everywhere vs. Hypermedia-On-Whatever-you'd-Like aspect of it, which i believe are relatively unique in the discussions i have seen but, it is fair, both laziness and self-promotion are forever a danger for me
Re: How a hypermedia approach can address usability concerns with multi-page apps
#55Regular server/client beats SPA because each request starts with an empty state, whereas SPAs build up bugs as they try and fail for mutate state over time. What about an SPA that made internal requests to a server backend, running in the browser?
> each request starts with an empty state Strange place to post such a … misguided stance. HTMX regularly brags about how it’s meant to be used to mutate the DOM the user already has loaded, thru custom HTML attributes handled by their JS framework. You’re just arguing in favor of HTML, but HTMX is trying to have their cake and eat it too. JS-level state is clearly easier to manage than DOM-level.
Re: How a hypermedia approach can address usability concerns with multi-page apps
#56That said, the one criticism I can lob is toward the assumption that JavaScript / TypeScript will be the only path for SPAs, creating a full-stack monoculture. Web Assembly is on its way to negating this point long term.
I don't think this affects the position on MPAs, but weakens that one particular argument against SPAs.
Re: How a hypermedia approach can address usability concerns with multi-page apps
#57Re: How a hypermedia approach can address usability concerns with multi-page apps
#58hello, I am the author of this article it is a response to a talk that Mr. Harris gave at JamStack entitled "Have Single-Page Applications Ruined the Web?": https://www.youtube.com/watch?v=860d8usGC0o in the article I show how a hypermedia-oriented (rather than javascript-oriented) library like htmx can address many of the usability concerns that Mr. Harris raises with MPAs, without abandoning the fundamental REST-fu…
I did some experiments around on how to do animated shared element transitions (as well as reactive functionality) within a REST mindset here, if anyone's curious: https://dev.to/eshan/toward-the-postmodern-web-38h (you can just scroll to the embeds)
Ultimately, maybe the browser vendors will do something here, like Google's portal elements, for example. A lot of effort is being spent on that flash during page loads.
Re: How a hypermedia approach can address usability concerns with multi-page apps
#59hello, I am the author of this article it is a response to a talk that Mr. Harris gave at JamStack entitled "Have Single-Page Applications Ruined the Web?": https://www.youtube.com/watch?v=860d8usGC0o in the article I show how a hypermedia-oriented (rather than javascript-oriented) library like htmx can address many of the usability concerns that Mr. Harris raises with MPAs, without abandoning the fundamental REST-fu…
One really really nice thing about HTMX is how easy it is to "spruce up" a UI. You say "this part of my website could really do with some active content" and you start thinking about xmlHttpRequest and callbacks and and JSON and all that and you think "does it really need sprucing?". But with HTMX it's usually just adding a couple hx- attributes and maybe a couple serverside lines and you're done.
Another really really nice thing about HTMX is how easy it makes it to make things degrade gracefully. Javascript enabled? Get your beautiful ajax. No Javascript? Get a good experience in the "traditional" model. In anything else I've ever seen, if you want that experience, you need to write your UI twice (and usually in two different languages / models).
So basically it drastically lowers the bar for making nicer experiences on top of a solid MPA. Especially if you're a solo developer, this basically means that you end up producing better UIs "for free".
Re: How a hypermedia approach can address usability concerns with multi-page apps
#60> And, contra what Mr. Harris says, today the trend is not obviously in javascripts favor. Five years ago, we, as founding members of the javascript resistance, were despairing of any hope of stopping the Javascript juggernaut. But then something unexpected happened: Python took off and, at the same time, javascript flat lined: Why yes... if you use Stack Overflow usage as your measurement. The problem is that doesn'…