Live data from Hacker News

Why I hate your Single Page App

medium.freecodecamp.org

81–90 of 128 posts

Re: Why I hate your Single Page App

#81
post #23
post #5

None of the things described here are inherent to single page apps. Ember (with Ember Data and proper routing), for example, solves most of the issues he brings up (back button not working, failure to link to individual items) by convention.

> None of the things described here are inherent to single page apps. Does it matter though, if they are still all prevalent on single page apps?

I think so, if only because the discussion should be surrounding best practices and following standards, as opposed to a sensationalist notion that single page apps should be abandoned in general.

Re: Why I hate your Single Page App

#82
post #42

Earlier quoted context omitted.

You probably have never tried a classic HTML "app": 1. Every click is fetched and rendered faster than your javascript code has had a chance to execute, let alone fetch or render. 2. True, minor headache though compared to the vast improvements in usability. 3. Nope. 4. Nope, this is a bug - something javascript pages most certainly are not immune against.

You're basing a lot of this viewpoint on fast internet connections. Javascript code rendering will be faster if you have a slow internet connection and are using an updated browser with a fast javascript engine

Eh, I've yet to experience an spa that feels or is faster than the equivalent simple html, no matter what network I'm on - with the exception of being off-line (and I've seen few enough spas that actually work better offline than static pages, ie not broken navigation/functionality).

Note that I've of course seen countless slow, bloated static pages - but that's pretty much never because of the tech stack - but because of bloated css, silly large images, and often horrible convoluted html.

Hn is of course a typical example of a web page that on paper would be great as an spa, but works fine as a static page with minor js (broken up/down links notwithstanding..).

D-lang forums is another :

https://forum.dlang.org/

Assuming a 64 kbps connection, and a 50%+ gzip compression, downloading a couple of pages of text is done in about half a second. If the user has such a terrible connection, they've hopefully turned off image loading. I don't think adding 40-400 kbs of gzipped js is going to help with the speed...

https://gist.github.com/Restuta/cda69e50a853aa64912d

Re: Why I hate your Single Page App

#83
post #78

Earlier quoted context omitted.

When you click a link or button on a normal website, the browser doesn't give indication on the ongoing state of your http request either. Only a javascript-enhanced experience can do that. Clicking on a save button and seeing the page hang is the normal way browsers handle http requests. But a javascript-enhanced experience can tell users about the local perception of the http request (ongoing, timeout, retry, error…

Most browsers at least show a spinner somewhere, do they not?

Forgot about that one.

Re: Why I hate your Single Page App

#84

Earlier quoted context omitted.

Since we're talking about poorly implemented features. Why I hate your SPA: - If I click on a link, I receive no indication that I actually clicked a link, then 2-10 seconds later the page abruptly loads. Sometimes the page doesn't load at all. - I cannot tap and hold a link, wait a second for the pop-up menu, and open the link in a new tab because the link isn't actually a link. It's implemented in JavaScript. - The…

Back and forward buttons should scroll when there is a link to an anchor on the same page.

There was some website linked to by HN a while ago that as you scrolled down the page, history events would be recorded. So if you wanted to go back to the previous page, you'd have to press back about 8 times if you scrolled to the end of the article.

Re: Why I hate your Single Page App

#85
post #42

Earlier quoted context omitted.

You probably have never tried a classic HTML "app": 1. Every click is fetched and rendered faster than your javascript code has had a chance to execute, let alone fetch or render. 2. True, minor headache though compared to the vast improvements in usability. 3. Nope. 4. Nope, this is a bug - something javascript pages most certainly are not immune against.

You're basing a lot of this viewpoint on fast internet connections. Javascript code rendering will be faster if you have a slow internet connection and are using an updated browser with a fast javascript engine

My homepage has about 81kb of data to transfer, including images.

If you turn off images, you get in with 12kb of data. I think 12kb of data should be transferred faster than even the more lighter JS frameworks around...

Re: Why I hate your Single Page App

#86

Earlier quoted context omitted.

Since we're talking about poorly implemented features. Why I hate your SPA: - If I click on a link, I receive no indication that I actually clicked a link, then 2-10 seconds later the page abruptly loads. Sometimes the page doesn't load at all. - I cannot tap and hold a link, wait a second for the pop-up menu, and open the link in a new tab because the link isn't actually a link. It's implemented in JavaScript. - The…

When you click a link or button on a normal website, the browser doesn't give indication on the ongoing state of your http request either. Only a javascript-enhanced experience can do that. Clicking on a save button and seeing the page hang is the normal way browsers handle http requests. But a javascript-enhanced experience can tell users about the local perception of the http request (ongoing, timeout, retry, error…

Firefox for Android shows a thin orange progress bar beneath the navigation bar, and Chrome for Android shows a similar blue one. Firefox and Chrome for the desktop show the loading spinner in the tab.

Re: Why I hate your Single Page App

#87
post #62

Earlier quoted context omitted.

Middle clicking works great, so I am happy! Mice need at least 5 buttons anyway. Right click and open in new tab also works. I always forget about ctrl-click since I never use it, odd that it doesn't work given how well everything else does!

Middle-click is not working for me either in Firefox.

Works fine in both Edge and Opera (Hah!) on Windows 10. :)

It doesn't work in Internet Explorer though. No FF on this machine to test out unfortunately.

Re: Why I hate your Single Page App

#88
post #42

Earlier quoted context omitted.

You probably have never tried a classic HTML "app": 1. Every click is fetched and rendered faster than your javascript code has had a chance to execute, let alone fetch or render. 2. True, minor headache though compared to the vast improvements in usability. 3. Nope. 4. Nope, this is a bug - something javascript pages most certainly are not immune against.

You're basing a lot of this viewpoint on fast internet connections. Javascript code rendering will be faster if you have a slow internet connection and are using an updated browser with a fast javascript engine

I actually prefer HTML over SPA apps on slower Internet connections. I've found SPAs to be more infuriating to use when the connection is bad.

Re: Why I hate your Single Page App

#89
post #42

Earlier quoted context omitted.

You probably have never tried a classic HTML "app": 1. Every click is fetched and rendered faster than your javascript code has had a chance to execute, let alone fetch or render. 2. True, minor headache though compared to the vast improvements in usability. 3. Nope. 4. Nope, this is a bug - something javascript pages most certainly are not immune against.

You're basing a lot of this viewpoint on fast internet connections. Javascript code rendering will be faster if you have a slow internet connection and are using an updated browser with a fast javascript engine

One nice thing about regular HTML websites is that they only need to be downloaded once. When I was taking the train in to school, I'd often have a bunch of tabs open on my phone. If I tried to switch to an old Reddit (SPA) tab while going through a tunnel, the page would try to reload, fail, and replace all the content that was already there with an error message. With HN, by contrast, I could open up a bunch of tabs while I still had good internet and switch to them later even when I didn't.

Re: Why I hate your Single Page App

#90

> Maybe your single page app is different, but the ones that I know break most of my browser’s features, such as the back and forward buttons, page refresh, bookmarking, sending a link, or opening a link in a new window or tab. My SPA is different - https://www.seasonalfoodguide.org . Browser back button works like normal. Each screen has its own discrete URL, so you can share links, refresh, bookmark or open in a ne…

[deleted]
Post reply on HN