Ask HN: SPA vs. SSR in 2024?

7 points by _bin_ 2 days ago

I'm working on a new project that has a reasonable level of content/processing done on the backend but nothing too heavy. My default approach would be a simple SPA served statically with a CRUD backend, probably fastapi and svelte. However, I've heard lots of people extoll the advantages of more SSR due to better edge compute technologies. Lots of people seem predisposed to throw their backend on cloudflare workers or something and handle it there. What are y'all's experiences between the two?

It seems marginally more convenient for a large team to have a unified front/backend and people seem to like sveltekit, but it doesn't personally bug me to have the two separated. I could also see advantages to typescript/prisma/zod for instance over sqlalchemy and pydantic; pydantic improves python a bit along with mypy/pyright but typing is still very much hacked-in. It also seems like I'd increase my hosting bill a bit, both because SSR shifts work to the server and because workers or similar services generally have markups over a VPS. Thanks :)

solardev 2 days ago

What are you building? You should be able to articulate the pros and cons of choosing an SPA, SSR, SSG, or some combination of the above based on your user needs and team resources and constraints and the purpose of the app.

Most of the app can be statically built, first rendered on the server and then cached on a CDN as static files. Then certain rerenders and calls can be clientside and others can go through the server if needed.

It shouldn't just be a fashion choice, but a measured analysis. Like what is on your backend and what is on the edge, how would consistency work, what are the regional considerations, etc.

I feel like asking which infra to build without knowing the app is putting the cart before the horse. A dashboard is different from a chatbot is different from a marketing site is different from a graphics app, etc., and each has different architectural considerations.

nik736 19 hours ago

2024 is soo last year :)

theandrewbailey 2 days ago

> SPA vs. SSR in 2024?

Are you asking what was popular last year, or advice on what should be done today (2025)?

  • _bin_ 18 hours ago

    I forgot it's 2025 already hahahaha