2 ms·
This article rings very true to me. In my mind a badly managed project (and yes, these are legion) will accumulate complexity very quickly. The important techni
by afavour 5y ago
This article rings very true to me. In my mind a badly managed project (and yes, these are legion) will accumulate complexity very quickly. The important technical difference between MPAs and SPAs is where they put that complexity.
In a multi-page app the complexity largely lives on the server, which is a known quantity, profile-able and scaleable. In a single-page app the complexity lives on the user's device. There are innumerable variations in device power, capability and so on so there is no good sense of what "good performance" even is. But it'll work great on the developers supercharged MacBook Pros, so the code gets shipped.
- chrismorgan 5y ago> The important technical difference between MPAs and SPAs is where they put that complexity. Just as important a practical difference (an outworking of the complexity location) is the matter of statefulness. With an MPA, each page load is its own thing, generated from scratch from the canonical data source each time. Pages are essentially stateless. With an SPA, the client will generally be interested in retaining data and caching things for at least the duration of the session, and it’s easy for state to get out of sync. That can go wrong so many ways, and cause so much pain, and resolving that commonly takes reloading the whole page, which is normally distinctly slower than it would have been in the MPA world. (Not that it need be noticeably slower, but it almost always will be.) Or the absolute worst case, persisted wrong data… that’s a nightmare.