Live data from Hacker News

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

htmx.org

131–136 of 136 posts

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

#131
post #59

hello, 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…

As someone who has been developing websites for 15+ years and who stumbled across HTMX a year or two ago, I want to add a couple things here: 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 spruc…

I think React with SSR gives you that experience with the added bonus that you can use nice isolated and reusable UI components. The downside is you are forced to use JavaScript/Typescript for basically everything. Fortunately Typescript is a pretty decent language overall.

Also there are some systems trying to do the same thing but using Wasm (e.g. Percy).

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

#132
I watched the Jamstack talk and I dont think Rich quite grasp why some people are against SPA.

The first thing being, 95% of what I do on the web doesn't need to be an SPA. Most of what I do is content consumption. HN doesn't need to be SPA. NewsReading doesn't need to be an SPA.

The second thing being once you allowed developers of SPA, and break free of the browser default usage pattern, there are very few SPA I have used that I even considered to be decent. Actually there is only one, Feedly. And yes, as pointed out in the video, even instagram cant do the basic right. Not Facebook web, and not Twitter. Look at new Reddit.

The problem with SPA is once you try to make a Web App, aka Reddit, I will instantly try to compare it with a Native App. And I have yet to see a single decent Web App that compares to "average" native app. It is far easier to make a very decent MPA with added magic like HTMX or Hotwire than a decent SPA.

The third being transitional design. Which is a compromise or taking best of both worlds. Interestingly HTMX or Hotwire are also considered as Transitional, since they try to make the those web page that needs a little more interactively without switching to SPA.

There are some things that are better for SPA, so far most them for me tends to be financial tools and graph based.

One argument for SPA is that your backend is just an API, your front end could now work not only in browser but even compiled natively into Apps. But so far none of them worked flawlessly across all platform without a team of expert.

And for simplicity, PHP is still by far the best in modern web backend tool kit. I am not advocating for PHP, I hate the syntax but other than that it is dead simple to use and set up. Considering both Hotwire / HTMX with Django and SPA camp with Svelte just shows how little the vocal web developer community value simplicity.

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

#133

Earlier quoted context omitted.

Absolutely this- Saying that the complexity of modern web dev is needless without even addressing things like state management, URL routing, component encapsulation, stylesheet encapsulation, performance, compatibility, semantic markup, offline-first, server-side rendering (for SEO and first paint) are somehow not real problems that need to be addressed. If you don't do it in the frontend, guess what? All of that is…

Half of those things you list are already handled by the browser, that's why htmx is so simple. Htmx does not preclude building an SPA, because all resources can be directed through service workers, but that's outside of the scope of htmx specifically. It just directs you to use hypermedia and exploit native browser technologies instead of inventing ad-hoc JS libraries and/or protocols.

No, they are handled by your server app. The point is these things can be on one side or the other.

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

#134

Earlier quoted context omitted.

Was that supposed to do something other than show half a page and not respond to clicks and scrolls? iOS 15 on iPhone SE 2.

On my MacBook, canonic.com displays a few sentences of text and a few links. To do this, it takes 15 seconds to load a 25 megabyte WASM payload. The resulting page draws all of its content onto a , scrolls backwards because it somehow ignores my system's "natural scroll direction" setting, and doesn't let me right-click to open links in a new tab. In other words, it's a demo of what Web performance and usability will…

OK, I reloaded it in Brave on Ubuntu and it had the features you mentioned. I suppose it's interesting but it's unclear what path there is to making it the standard that replaces the standard.

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

#135

hello, 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 don't think a lot of the points in the article hit home for me. On one hand you suggest the culture of complexity is overwhelming, when just a few paragraphs earlier you suggest that sql-tuning and redis caching are how to deal with some of htmlx's problems with latency. That seems highly complex. You have to make deep changes to the back-end and data persistence systems to solve a front end issue. It feels like th…

> It feels like the article is trying to say you shouldn't use javascript frameworks in a lot of cases, but then it advocates for using htmx, which is a javascript framework, in those cases?

Htmx isn't a JavaScript framework, it's a hypermedia framework, and they're encouraging taking hypermedia as far as possible before dropping to scripting.

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

#136
post #113

Earlier quoted context omitted.

This probably feels like a big advantage if you’re in the JS world where setting up IDEs and bundlers and CI is a big involved endeavor, but Go+static HTML is close to effortless. No need for CI pipelines to build and publish source code or docs packages, and the test framework and build tooling require minimal effort to set up in a CI capacity. Similarly, Dockerfiles are trivial and minimalist, and everything builds…

If you can afford static (100% server-rendered) HTML, the world is your oyster! Party like it's 1998, but with incomparably better tools. But a large enough proportion of modern web sites need enough interactivity to make even jQuery or even HTMX slightly inadequate.

I would argue this proportion is a lot smaller than the number of websites that think they do.
Post reply on HN