Live data from Hacker News

Why I hate your Single Page App

medium.freecodecamp.org

61–70 of 128 posts

Re: Why I hate your Single Page App

#61

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

That is an incredible website. It is amazingly responsive and fast, I couldn't tell it was an SPA because of how well it behaves in every possible way, yet it is far too responsive to be anything but an SPA.

Even as someone who cooks a lot, using the site doesn't come naturally to me, my typical shopping method is to go to the store and think up of what I want to cook as I stroll around the outside picking up fresh food. Or I put recipes from blogs into a shared family OneNote section and use that to do more directed shopping.

That said, the links off of the food pages are high quality, with very good info on what to do with each item, so I try and spend some time exploring the resources you've put together!

Re: Why I hate your Single Page App

#62
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.

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!

Re: Why I hate your Single Page App

#63

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…

. - If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it.

This was fixed in browsers years ago when they started keeping form state along with page history. I can refresh this page, go back and forth in history, and this text box will keep my comment. Ironically, websites that tried to be clever about form state management and faked page transfers (like ASP.NET WebForms) didn't benefit from the fixes and currently are significantly worse off in terms of usability than websites that used vanilla forms.

I think there is a lesson here.

Re: Why I hate your Single Page App

#64

I've always liked JQueryMobile because it breaks so few things. I haven't tried some of the newer alternatives.

JQueryMobile was the slowest ugliest thing back in 2011-13 timeframe. Faking the iOS1-6 UI controls even on Android - no words.

Re: Why I hate your Single Page App

#65
post #54

Web browsers were designed to deliver stateless documents to users. Modern users want content delivered to them in a personal, rapid, contextual(stateful) manner Fight.

> Modern users want content delivered to them in a personal, rapid, contextual(stateful) manner Is that actually true? Maybe it's that web developers want to deliver content in this way and try to do it with the browser instead of a native application more fit for purpose and they don't actually give a damn about what the user wants.

> Is that actually true? Maybe it's that wev developers want to deliver content in this way and try to do it with the browser instead of a native application more fit for purpose and they don't actually give a damn about what the user wants.

Remember old forums that made you load each and every reply in a thread?

Compare that to Reddit which allows for collapsing and expanding of threads, and for async loading of reply chains that go on for too long.

Being able to open-in-place media users link to was a huge reason for the uptake of Reddit Enhancement Suite, now, a feature built into Reddit. Upvoting not taking users to a new page or reloading the page (compare to how Slashdot used to do it!), all these features involve maintaining state.

Same thing for most bug tracking apps. If I am triaging a list of bugs, a SPA is the way to go, I don't want to spend more time on page loads then on marking triage status.

Re: Why I hate your Single Page App

#66

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

Broken for me. I am middle clicking to open in a new tab and Javascript is forcing it to open on the current page. Additionally, the page is blank except for a background image when Javascript is turned off.

Re: Why I hate your Single Page App

#67

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…

Most of your criticisms are solved with basic javascript, not necessarily single page applications. > You forgot to update the styles on that rarely-used page That's solved with proper css, not SPA.

You're right! If we just implemented everything correctly, there wouldn't be problems!

Anecdotally, every team I've worked with has converted to a SPA, and the main ergonomic upgrade is that updates to the signup page or the "not found" widget quit getting forgotten whenever we change tweak our design. There always seems to be one page that's out-of-date for 2 months before anybody notices, then it quietly gets fixed up because we forgot that the design tweak was a CSS+HTML change, not pure CSS.

Not that that's perfect -- once you have a SPA, nobody remembers the 404 page, because it's a different HTML base...

Re: Why I hate your Single Page App

#68
post #42

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…

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.

Of course I've tried a classic HTML app. That seems disingenuous?

Re: Why I hate your Single Page App

#69
post #62
post #58

Earlier quoted context omitted.

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

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.

Re: Why I hate your Single Page App

#70

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…

- If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it. Even when I was coding web pages in Perl in the 90's I wouldn't do that to a user, that's just mean. You don't need a SPA to provide proper error handling that also rebuilds previous state.

Sadly there is a major e-commerce provider in my niche which does exactly that - routinely forgets all my information.

In fact sometimes their web form just forgets things for no reason.

There is no competitor in sight because of the huge huge SEO juice they have built over 15 years.

Post reply on HN