Live data from Hacker News

Why I hate your Single Page App

medium.freecodecamp.org

51–60 of 128 posts

Re: Why I hate your Single Page App

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

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

Re: Why I hate your Single Page App

#52

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 think the prime directive of all UI should be, "Ack UI inputs immediately, no matter what else is going on." Throw up a spinner, make something throb, change a status to "loading", anything. Don't just go off and attempt to do it and hope for timely response.

Re: Why I hate your Single Page App

#53
post #32

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…

> When I have multiple tabs open, your badges and notifications fall out of date, because you never poll for updates. How bad is that really if users are aware of it and they can simply reload the page?

Not very bad for Hackernews. Terrible for Facebook, Twitter or any website that claims to be interactive

Re: Why I hate your Single Page App

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

Re: Why I hate your Single Page App

#55

Earlier quoted context omitted.

"If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it." This. I have a very short list of architectural must-haves that I use when evaluating junior dev's code at the start of a project, and not having robust error handling that preserves submitted form information is right up near the top. It's an annoying design mistake with two input elements, unworkable…

You're not evaluating them based on requirements you didn't share, are you? That seems a little unfair

Is'nt that the point of an evaluation ?

"Hey, here is your test and here are the answers. You've got one hour" :)

Re: Why I hate your Single Page App

#56
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

In theory you have a point. In practice though the initial loading of the first page is so slow that it completely negates the benefits entirely.

It also doesn't work well when opening lots of tabs (which is a popular technique that helps immensely when browsing on a slow connection as pages are loaded in the background).

And if you have a really slow or spotty connection the javascript page would barely load at all.

Re: Why I hate your Single Page App

#57

Earlier quoted context omitted.

"If I mis-enter information into a form, your error handling forgets all my information and I have to re-enter it." This. I have a very short list of architectural must-haves that I use when evaluating junior dev's code at the start of a project, and not having robust error handling that preserves submitted form information is right up near the top. It's an annoying design mistake with two input elements, unworkable…

You're not evaluating them based on requirements you didn't share, are you? That seems a little unfair

Not evaluating them; evaluating code.

Just handing someone an expanded version of "implement good error handling" is not likely to result in a good product. Every project has nuance and subtle trade-offs -- the code review is an opportunity to teach juniors how to map abstract design principles onto concrete implementations without falling back to "cookbook / cargo cult" programming.

I want them to take ownership of their own code, and advance down the path of craftsmanship because I believe this results in long-term value -- both to them personally and to the project at hand.

Re: Why I hate your Single Page App

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

Re: Why I hate your Single Page App

#59
post #29

+1000 The biggest things for me are probably the excessive amount of resources used, the long load times, how hard it is to get things "right" (like not breaking the back button) and links taking awhile to load because we have to load your stupid SPA (if they work at all). SPAs did win out big in one area though. On mobile. Except on mobile they're called "apps". As much as many HNers like to chafe against native mob…

I wouldn't say that mobile apps "won" anything, just that networks and hardware aren't fast enough yet for browser on mobile. Desktop started the same way, and just as most of the desktop apps have moved to the browser, so too will mobile apps. React native, cordova etc are just the early signs of this transition.

Re: Why I hate your Single Page App

#60

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…

Just to be clear, that is a poorly designed SPA, none of that should be happening and is easy to avoid.

That is absolutely true, but I've seen it enough times to be annoyed. Also, the grand parent post was about classic HTML apps which were poorly designed with issues that should be easily avoidable.
Post reply on HN