Live data from Hacker News

Why I hate your Single Page App

medium.freecodecamp.org

21–30 of 128 posts

Re: Why I hate your Single Page App

#21

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.

Re: Why I hate your Single Page App

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

Even Angular solves most of these problems.

Re: Why I hate your Single Page App

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

Re: Why I hate your Single Page App

#26

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.

Also a sane build/deployment process will solve this.

Re: Why I hate your Single Page App

#27

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

Re: Why I hate your Single Page App

#28

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…

I only scanned towards the end, but I was waiting to here what his proper architectural would be. I don't like complaining unless you have alternative you're ready to support.

Re: Why I hate your Single Page App

#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 mobile development as they yearn for the open standards of the Web, native apps have basically "won". Users love em.

I guess that leaves desktop.

I do wish more people asked "does my Web presence need to be an SPA?" or even "will it benefit significantly from being an SPA?" because I feel like the answer more often than not is "no".

Re: Why I hate your Single Page App

#30
Most websites get little benefit from using a SPA architecture, and the negative aspects are significant:

- deploy headaches

- the infamous JS fatigue

- debugging (minified code and nested anonymous functions make it painful)

- troubles with content blockers

I guess we'll have to wait a few years until the JS/SPA ecosystem will become more mature and find good solutions to these annoyances. Until then I'd gladly stick with rails, django & friends, both as a developer and as a user.

Post reply on HN