|
|
|
|
|
by toastal
2318 days ago
|
|
SPAs don't make sense if it's not an 'application', but wouldn't a SPA be faster over time not having to reload the whole page and all that duplicate markup? Wouldn't the simple JSON calls be smaller than refetching and rerendering all of the HTML? Front-end application offer more than just no-reload though, like push notifications, real-time data, and offline caches. |
|
JSON may or may not be smaller or faster: if you have to load data you don’t need or, worse, chase links it’ll be worse. GraphQL may help but that’s bringing it closer to server-side performance, not exceeding it.
Things which aren’t possible otherwise are the best argument for SPAs, but another approach is progressive enhancement: you can load quickly and then load features as needed rather than locking in a big up-front cost if all you need are real-time updates or push notifications. There’s a spectrum of capabilities here and there won’t be a single right answer for every project.