Live data from Hacker News

How a hypermedia approach can address usability concerns with multi-page apps

htmx.org

11–20 of 136 posts

Re: How a hypermedia approach can address usability concerns with multi-page apps

#11

> 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'…

My gripe with Stack Overflow is that TypeScript and JavaScript is now what is conflated by question askers.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#14
post #12

I don't mean to belittle anyone, but libraries like htmx are rather primitive compared to tools like svelte. What makes them see themselves so important?

From the article:

> This is, unfortunately, part of the culture of front end development right now: sky-high levels of complexity are tolerated in application frameworks, in build tool chains, in deployment models and so on, and, when problems arise due to all this complexity, more complexity is often offered as the answer.

> "Simple" is disparaging and "sophisticated" is high praise.

So, rather.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#15
post #13

> CPU is cheap, network speeds are fast and increasing and microservices are a mess. Is CPU cheap? I can literally host a static site or SPA on GitHub Pages for free. Where can I get free CPU time for an htmlx application?

You can host an htmx-based site on Github Pages for free as well.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#16
I’m confused here: htmx is not an MPA. If it were, then you’d call a SSR React site a MPA too.

The core behavior of a SPA is that it loads pages via ajax and just replaces content in the current “document”. The difference between a simple SSR React site and this is that React will only fetch JSON and templates after the first load, whereas this one fetches whole chunks of HTML.

An htmx site still has to deal with all the pitfalls of SPAs, namely non-native navigation and history, and memory leaks.

Just like htmx may have solved some of these issues, a (other framework) SPA can do too.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#17
post #2

I dont think it has to be all or nothing. I think the best answer is to use both technologies as appropriate even in the same app. I was writing something like htmx without intercooler with Angular with Django (which I fondly called Djangular) in 2013. It just needed yet another framework type abstraction to reduce the boiler plate. Send json with the html on initial page load, use the json api to load addition data,…

Indeed that is what Mr. Harris calls a "transitional" app, and, with him, I can recommend that approach. The difference between us on that matter would be that I would recommend leaning hypermedia, whereas, at the risk of putting words into his mouth, he would appear to lean SPA/RPC as the default approach.

> The difference between us on that matter would be that I would recommend leaning hypermedia, whereas, at the risk of putting words into his mouth, he would appear to lean SPA/RPC as the default approach.

Isn't the default essentially @svelte/kit now? That's got SSR built in and a preloading layer that's much closer in nature to HTMX than to an SPA framework. RPC just happens to be the easiest way to abstract out data for static sites, SPAs, and runtime SSR.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#18
contrary to most of the comments I'm in full agreement with the hypermedia approach. This is an exciting development, especially with hyperscript!

I actually attempted to make a "simplified" "js" framework (where you just had some html tags and it did things for you) for tasks congruent to alpine (since I found alpine rather complex, or that it comes with so much but you still have to do a good amount of work to get things working) but I'm not as savvy; using the DSL you all have in hyperscript is real smart, simple.

Not too long ago I looked into using Svelte for a one-off project (since it was the highest rated framework at the time) which then prompted me to look into the current state of web development.

It's absurd, and left such a sour taste that I just shelved the project for another time.

Great stuff you guys got going here, it makes me excited to see what'll turn into in the future! Looking forward to trying this out later.

Re: How a hypermedia approach can address usability concerns with multi-page apps

#19
post #16

I’m confused here: htmx is not an MPA. If it were, then you’d call a SSR React site a MPA too. The core behavior of a SPA is that it loads pages via ajax and just replaces content in the current “document”. The difference between a simple SSR React site and this is that React will only fetch JSON and templates after the first load, whereas this one fetches whole chunks of HTML. An htmx site still has to deal with all…

there is a spectrum, as Mr. Harris discusses in his talk

the core difference between htmx (and hotwire, unpoly, etc) and most SPA frameworks is that they stick closer to the original hypermedia model of the web, thereby saving a lot of complexity and additional abstraction

Re: How a hypermedia approach can address usability concerns with multi-page apps

#20
post #7

I'm sorry but what's the point here? Rich's talk was not even remotely aimed at HTMX yet this article is nothing but a shameless list of HTMX features.

The point is that Rich suggested that SPAs are the only way to solve these problems, and that MPAs can’t. This is a rebuttal from HTMX suggesting that MPAs can in fact solve these problems.

Rich wasn’t arguing for SPA but for hybrid SSR, so that seems like it’s a non-sequitur.
Post reply on HN