News for hackers. Stuff that matters.
Re:Escaping the SPA rabbit hole with modern Rails by cm2187 on Sunday July 08, 2018 @04:21AM (#17482703)
As a user my main beef against SPA is that most of the time they break basic browser functionalities, like the ability to open links in a new tab, or using the back button. When the UI doesn’t simply break with part of the content off-screen.
Re:Escaping the SPA rabbit hole with modern Rails by thesephist on Sunday July 08, 2018 @08:40AM (#17483486)
Having built some SPA's, I'd argue that at least those two things that you mentioned are the fault of whoever built bad SPA's, rather than issues with SPA's as a whole. It's possible to build an SPA that works well with the browser controls because modern browsers expose a lot of their functionality to JavaScript (like it or not). You can use <a> tags for buttons and links in an SPA (and keep the link functionality) -- you can just intercept the clicks when the link is being opened in the current tab, and you can always hook onto pushState/popState to make the back/forward button work.
Re:Escaping the SPA rabbit hole with modern Rails by acdha on Sunday July 08, 2018 @09:42AM (#17483747)
It is an issue with SPAs as a concept because part of that concept is that you’re taking on responsibility for things the browser traditionally did for you.

That’s not a bad thing but it’s extra work which someone has to be responsible for, similar to how e.g. using a complex custom widget means you’re on the hook for accessibility rather than the browser vendors.

Re:Escaping the SPA rabbit hole with modern Rails by baddox on Sunday July 08, 2018 @06:31PM (#17486640)
Surely most creators of SPAs are using some routing library, and I’m not aware of any routing libraries that don’t handle this anchor tag click behavior by default. It’s really a trivial amount of “responsibility” to take on.
Re:Escaping the SPA rabbit hole with modern Rails by acdha on Sunday July 08, 2018 @11:19PM (#17487745)
Perhaps, but it’s something I encounter fairly regularly, especially when an unreliable network connection or other JavaScript failure breaks something with poor error handling. Again, not a showstopper but it’s a decision point: if you aren’t committed to testing this kind of thing on every release, you don’t have the resources to build an SPA.
Re:Escaping the SPA rabbit hole with modern Rails by emodendroket on Monday July 09, 2018 @10:13AM (#17490283)
It's no different than stuff like not trusting browser input or avoiding a massive session when you're working on a Web app: it's simply basic best practice stuff that you don't even have to think about if you have an idea what you're doing.
Re:Escaping the SPA rabbit hole with modern Rails by temporaryacc62 on Sunday July 08, 2018 @09:39AM (#17483735)
Would you say Youtube works better now as it is fully SPA?
Re:Escaping the SPA rabbit hole with modern Rails by fny on Sunday July 08, 2018 @10:19AM (#17483911)
There's an army working on YouTube, and it has the traffic levels to justify the investment. They can actually put in the required effort to ensure the application functions seamlessly and meets accessability standards.
Re:Escaping the SPA rabbit hole with modern Rails by Rjevski on Tuesday July 10, 2018 @04:25AM (#17496256)
It does not. The SPA is so sluggish I’ve learned to just force a page refresh after clicking on anything because a full page load is actually faster than their bullshit SPA.
Re:Escaping the SPA rabbit hole with modern Rails by emodendroket on Monday July 09, 2018 @10:07AM (#17490237)
That's exactly the reason to use a SPA framework where all these problems are solved for you.