4 ms·
Hear hear! I don't think the assertion that SPA's are faster to build / more scalable holds up to much scrutiny. 1. SPA's still require some back end to render
by the_gastropod 8y ago
Hear hear! I don't think the assertion that SPA's are faster to build / more scalable holds up to much scrutiny.
1. SPA's still require some back end to render the initial page / payload.
2. SPA's cannot be trusted, so you need to duplicate things like validations.
2a. "But you can just do an ajax call to validate records on the back end, and get a json response!" — how's that any more performant than just doing a traditional page load? With pjax or turbolinks, the performance difference between these options is even closer.
- vidarh 8y agoI remember a decade ago, when there was a management demand to get rid of the "page load", and our quick and (very) dirty solution was to simply load the next page with ajax as HTML and simply replace most of the body with the body of the loaded page. It was hardly any faster (we measured), but everyone insisted it was suddenly blazing fast. The psychological effect of avoiding the visual artefacts of a page load was large enough that it was mostly sufficient. We eventually did some minor optimisations - returning smaller parts of the page, and replacing more precise sub-parts of the DOM. We had some other small pieces of JS on the pages too, but for the most part just having the server render everything replacing large chunks was good enough.