Most SPAs seem to only serve one or two ‘soft’ navigations after the initial ‘hard’ navigation (the one that loads the entire app upfront), meaning the cost is not being amortized across many requests, negating the whole point of the architecture.

  • madnificent@lemmy.world
    link
    fedilink
    arrow-up
    11
    ·
    23 hours ago

    There is a distinction between an app and a site. An application has many partial state updates. Two updates is uncommon for an app. Way different for a website where people ideally land on the right page from a search engine. There is a place for an SPA but it’s not everything.

    We tend to stick with an SPA even for things which are mainly reads because we’re more efficient in a single tech stack. Sadly we don’t have big tech budgets to do everything. In theory the JS SPA backend can simply run in the backend if there’s no need for an SPA. I had thought hydration and caching to have gotten way better by now but there’s still a good way to go.