Live data from Hacker News

Your single-page app is now a polyfill

itnext.io

31–40 of 164 posts

Re: Your single-page app is now a polyfill

#31
> Most times, a frontend framework is added as well to handle the rendering of these pages, increasing complexity further.

This is true, but it doesn’t need to be this way at all! Here’s a single page app written without a bloated framework:

https://github.com/rajeev-k/eureka

And here’s the client-side router, which is all of 500 lines:

https://github.com/Rajeev-K/mvc-router

React + Redux + ReactRouter is way too complicated and it is getting more complicated every passing day, with things like react hooks and so on. But 90% of web apps don’t need that complexity.

Re: Your single-page app is now a polyfill

#32

With service workers disabled on firefox the site just breaks, no graceful degradation/progressive enhancement. When clicking links in the header the url will change, but the page content doesn't.

Which in turn means that sites using this technique will not work in private browsing mode.

Re: Your single-page app is now a polyfill

#33
post #26

> Why do we build single-page apps?... > We want our web apps to feel “instant”... > Blank screens make for a bad user-experience... In my experience if you really need fast page loads, SPAs are off the table. So the premise of the article makes no sense to me. In fact, what do people on HN think the main reason to choose an SPA is these days?

For me, SPA is either chosen due to "fancy factor" or because the app is too complex to easily implement as a traditional (SSR) web page. That could be a complex search+filter with autocomplete, or a social network-like UI with infinite scroll and dynamic widgets.

Yes in practice this is what I see as well. I would also add, "developer likes framework x tooling". The other use case that SPA frameworks sell, is develop for all platforms For web, mobile and desktop. It sounds nice on paper, but I have no experience with it.

Re: Your single-page app is now a polyfill

#35
> Blank screens make for a bad user-experience. Users don’t want to wait for content to arrive from a server when they click a link or a button. They expect websites to be fast like native apps.

Why would users expect that? Most of websites use multiple pages and users are used to that. We change pages when reading paper books too. It’s not instant.

In fact, some SPAs are much harder to navigate because they are over engineered.

Re: Your single-page app is now a polyfill

#36
post #2

off-topic: how/why is medium still around with their very aggressive techniques? They started as a minimalist blogging platform, and once they acquired the content, they started putting paywalls in front of their users' content.

For better or worse, Medium is not just around, it’s growth is (apparently) accelerating: https://blog.medium.com/whats-around-the-corner-for-medium-b...

not so sure about that. alexa stats and every other stat show them on a downward trend

Re: Your single-page app is now a polyfill

#38
post #35

> Blank screens make for a bad user-experience. Users don’t want to wait for content to arrive from a server when they click a link or a button. They expect websites to be fast like native apps. Why would users expect that? Most of websites use multiple pages and users are used to that. We change pages when reading paper books too. It’s not instant. In fact, some SPAs are much harder to navigate because they are over…

> Why would users expect that?

People are impatient and expect everything on three computer to be as fast as the faster things on it. Anything slow can feel like there is something wrong.

They don't expect things to be instant, but your page turning example is relevant: if losing a new page take the time of a physical page turn or two then it is probably fine and feels smooth. More than a few hundred ms and things feel more "janky". This is something some people cite as why they don't like e-ink devices.

> some SPAs are much harder to navigate because they are over engineered

This is definitely true, but also holds for many non SPA sites too.

> > blank screens

This part of the parent post is significant IMO. If the previous page vanishes I find I'm less patient waiting for the new information. This is worse if there has been a delay before that happens too.

Though likewise if nothing changes I might think something is amiss: did my click even register? Some extra indication of action (the click target changing colour is sufficient) helps here, when the background request doesn't show in the browsers built-in activity indicators.

Re: Your single-page app is now a polyfill

#39
What does the article mean by "polyfill"?

Edit: from Wikipedia

In web development, a polyfill is code that implements a feature on web browsers that do not support the feature. Most often, it refers to a JavaScript library that implements an HTML5 web standard

Re: Your single-page app is now a polyfill

#40
> So we build single-page apps, where only the content that changes in the page is replaced, avoiding a full page reload, so navigating to another page feels instant.

HTTP caches and the absence of overcomplicated JS frameworks will do this better than any developer (simply because there's less to be done).

This article is basically a web dev admitting native apps are better but refusing to behave accordingly, choosing instead to make their own lives harder.

Edit: Also, makes this whole statement then publishes their article on medium...

Post reply on HN