Live data from Hacker News

Why I hate your Single Page App

medium.freecodecamp.org

91–100 of 128 posts

Re: Why I hate your Single Page App

#91
post #58

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

> My SPA is different - https://www.seasonalfoodguide.org . This app is a good example of one of my pet peeves: ctrl-click doesn't reliably open links in a new tab.

Ditto, CMD+Click is borked (OSX, Firefox nightly)

While the rest functions very well, this is case-in-point ... it's difficult to re-invent app use cases that browser vendors generally take care of.

Edit: Printing is also borked it seems, whether or not that's a use case for your audience is another question.

Re: Why I hate your Single Page App

#92

Why I hate your classic HTML app: - Every click is a full page load, and you still didn't manage to get caching right, so it takes 2 seconds to load. - When I have multiple tabs open, your badges and notifications fall out of date, because you never poll for updates. - If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it. - You forgot to update the styles on…

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…

I love browser push state so cool, but yeah if it doesn't work right you get stuck not being able to go back.

Edit: also agree to it disappear when accidentally hit back or leave page... I don't think you need to ask permission to use cookies so should opt for it... Or some other way to store.

Re: Why I hate your Single Page App

#93
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?

In chrome the bottom left status "connecting url..." Like a grey rectangle

Re: Why I hate your Single Page App

#94
post #92

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…

I love browser push state so cool, but yeah if it doesn't work right you get stuck not being able to go back. Edit: also agree to it disappear when accidentally hit back or leave page... I don't think you need to ask permission to use cookies so should opt for it... Or some other way to store.

The problem with using cookies for navigation is then you restrict the user to a single window/tab. If the user opens a separate window and navigates somewhere else in the application, the cookie state will reflect the new window and disregard the state from the previous one.

Re: Why I hate your Single Page App

#95
post #92

Earlier quoted context omitted.

I love browser push state so cool, but yeah if it doesn't work right you get stuck not being able to go back. Edit: also agree to it disappear when accidentally hit back or leave page... I don't think you need to ask permission to use cookies so should opt for it... Or some other way to store.

The problem with using cookies for navigation is then you restrict the user to a single window/tab. If the user opens a separate window and navigates somewhere else in the application, the cookie state will reflect the new window and disregard the state from the previous one.

Sorry for the cookies I meant the storing of whatever you were writing into a form and accidentally hitting back or navigating away from the page. Like in mobile leaving the browser and returning to it, sometimes for me it starts it over haha no, just empty your soul into an essay response, all gone. Probably soared the recipient.

Interesting about the separate window, thought cookies could be set to never expire.

Re: Why I hate your Single Page App

#96

Earlier quoted context omitted.

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.

Slate.com does this.

Re: Why I hate your Single Page App

#97

Why I hate your classic HTML app: - Every click is a full page load, and you still didn't manage to get caching right, so it takes 2 seconds to load. - When I have multiple tabs open, your badges and notifications fall out of date, because you never poll for updates. - If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it. - You forgot to update the styles on…

[deleted]

Re: Why I hate your Single Page App

#98

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

The problem arguably is with SPA as an architecture.

The problem is not that SPA devs are not implementing these features, it's that the devs are responsible for implementing them in the first place. As other people have noted, even though you have gone through great lengths to make your site work as expected, "open in new tab" does not work.

These are browser features, and devs shouldn't have to worry about implementing them.

Re: Why I hate your Single Page App

#99
post #95

Earlier quoted context omitted.

The problem with using cookies for navigation is then you restrict the user to a single window/tab. If the user opens a separate window and navigates somewhere else in the application, the cookie state will reflect the new window and disregard the state from the previous one.

Sorry for the cookies I meant the storing of whatever you were writing into a form and accidentally hitting back or navigating away from the page. Like in mobile leaving the browser and returning to it, sometimes for me it starts it over haha no, just empty your soul into an essay response, all gone. Probably soared the recipient. Interesting about the separate window, thought cookies could be set to never expire.

Oh, I see. For saving the form state, localStorage would work better than cookies for saving and restoring because then the information is only kept on the client. That still doesn't solve the multiple window problem, but that's likely less of an issue for a filling out a form than for navigation.

Cookies can certainly be set to never expire, but you don't know which window the cookie was intended for because the cookies are shared.

Re: Why I hate your Single Page App

#100

Some of this hits home for me. I work on the WAY DEEP backend of one of these 'modern single page apps', so dont really care about the REST apis or UI/UX. I will say our actual website is a nightmare to use and I attribute a lot of it to (A) mgmt demanding bad UI/UX on short timeframes(B) front end folks having the power to write butt loads of JS code to achieve said goals with no thought to system wide architecture…

"you cant change one part of the site without breaking something else in a totally different section of the codebase" Welcome to the feeling I had in 2005 in a Java swing "application". And I guess lots of people felt the same even before..
Post reply on HN