Earlier quoted context omitted.
This is the opposite of what I would expect. React (or basically all JS SPAs) uses components which are essentially HTML elements populated by JSON data. It then stitches them together so that they can communicate via JS. I can explicitly tie together components/html client side via JS (annoying). Or I can simply render the correct html (no need for json routes) while I have access to all of the data on the server. R…
the efforts to write code for a javascript frontend framework vs a backend framework are exactly identical. there really is no difference. you save absolutely no effort by keeping html generation in the backend. the differences are rather in the architecture. you can win or loose a lot there, by choosing the right or wrong one. by creating an SPA you win a much simpler backend, you separate data storage and processin…
> you win the ability to upgrade/replace backend or frontend independently.
> you win the ability to develop with multiple independent teams because the connection between frontend and backend is smaller and easier to define.
> you win the ability to reuse generic backends over multiple projects...
None of these are really specific to SPAs, they apply to any architecture with a separation of concerns.