3 ms·
You acknowledge that it's the wielder of the tool, but I feel a need to repreent the SPA evangelism strike force because they're just so freaking cool. The web
by ChadNauseam 4y ago
You acknowledge that it's the wielder of the tool, but I feel a need to repreent the SPA evangelism strike force because they're just so freaking cool.
The web is a UI framework with features that are actually pretty hard to find elsewhere. It has native support for: tabs, forward and backward, zoom, and coolest of all, links so you can send the current UI view of an application to someone who's never heard of it before and they can open it up in seconds. All of those apply to regular websites too, but SPAs allow you to write actual apps in a way that doesn't want to make you pull your hair out. And it's often possible for a well-designed SPA is indistinguishable from a native site.
I maintain my personal website as a SPA. When I posted a monad tutorial on my site [0] to HN, not one person complained that my site is slow (it isn't) or that it doesn't work with JS disabled (it does [1]). Plus, when you hover over a link, it uses some SPA magic to prefetch the page you're going to visit, so the transition is even faster than it would be on a typical site. This is the archetypical case of "using a SPA instead of a static page for a really simple basic website" and I think it works really really well.
There's definitely some room for improvement. I'd love to be able to make it a bit smaller by rewriting it in Rust through WebAssembly, but it's not quite there yet.
[0]: https://news.ycombinator.com/item?id=30762281 https://news.ycombinator.com/item?id=30762281
[1]: except on pages that can't be implemented without JS, like https://chadnauseam.com/reasoning-quiz/ https://chadnauseam.com/reasoning-quiz/ or https://chadnauseam.com/productivity/rational-breaks/ https://chadnauseam.com/productivity/rational-breaks/
- int_19h 4y agoFWIW these features are not unique to the web. WPF offered a page-centric app navigation model for desktop apps, complete with forward/backward, history etc, since 2006 [1]. I haven't seen it actually used much though. And, to be honest, I don't think I'd want a desktop app to use it, unless it does something that is naturally represented in that paradigm (most use cases are not). [1] https://docs.microsoft.com/en-us/dotnet/desktop/wpf/app-development/navigation-overview https://docs.microsoft.com/en-us/dotnet/desktop/wpf/app-deve...