3 ms·
> Why do we build single-page apps?... > We want our web apps to feel “instant”... > Blank screens make for a bad user-experience... In my experience if you
by shusson 6y ago
> Why do we build single-page apps?...
> We want our web apps to feel “instant”...
> Blank screens make for a bad user-experience...
In my experience if you really need fast page loads, SPAs are off the table. So the premise of the article makes no sense to me. In fact, what do people on HN think the main reason to choose an SPA is these days?
- milankragujevic 6y agoFor me, SPA is either chosen due to "fancy factor" or because the app is too complex to easily implement as a traditional (SSR) web page. That could be a complex search+filter with autocomplete, or a social network-like UI with infinite scroll and dynamic widgets.
- shusson 6y agoYes in practice this is what I see as well. I would also add, "developer likes framework x tooling". The other use case that SPA frameworks sell, is develop for all platforms For web, mobile and desktop. It sounds nice on paper, but I have no experience with it.
- imtringued 6y agoThat sounds about it. People use SPAs to make webapps that are as complicated as regular desktop or phone apps.
- mrlala 6y agoFor sure. I have a complicated SPA app that is as complex as any desktop application; but with the flexibility of it being a simple web app. I never, ever, ever could have managed to pull this off before SPA. Especially as a non-primary web developer, angular basically does all the grunt work for me and allows me to keep a very structured application. Looking forward to attempting a blazor experiment as some point; as I still hate having to define the same object on the front-end vs back-end and I use dynamic data little too much.. but the current state of being able to use an SPA blows the options before out of the water. In my mind, you had to be a 100% javascript/web developer to create any type of usable complicated equivalent SPA.. but now I can do a structured (mostly) typed front-end.
- pier25 6y agoThere are two valid reasons IMO: 1) A use case that requires some form of persistence like Gmail or Spotify. 2) The added complexity of working on an SPA is worth it to decouple back/front end teams.
- robertlagrant 6y agoSPAs also can scale better - CSS, JS and HTML all just static files, not rendered by a server.
- tpxl 6y ago>In fact, what do people on HN think the main reason to choose an SPA is these days? The only reason to choose a SPA is when you need an _application_. A blog has no reason to be a SPA. A news site has no reason to be a SPA. HN has no reason to be a SPA. An internal support tool has a reason to be a SPA. A messaging app has a reason to be a SPA (slack et. al). A music player has a reason to be a SPA (spotify).