4 ms·
Better, just don’t write an HTTP API for your front end. Use a server side framework. Done. It’s a pain coming into a project that was built the way the articl
by agentultra 3y ago
Better, just don’t write an HTTP API for your front end. Use a server side framework. Done.
It’s a pain coming into a project that was built the way the article recommends. Endpoints become RPC calls instead of resources serving entities. The hodgepodge of “API” calls becomes difficult to scale horizontally due to implied (and never documented) data dependencies. So you miss out on transport layer caching, entity caching, and a host of other goodies.
All because your front end “framework” wants to live in a separate codebase from the server.
- deleted 3y ago[deleted]
- hakunin 3y agoThe "page" becomes the resource for reads. You get great scalability, because you can use your database in the most efficient way possible to provide entire data for the page. You can maintain 100% back-end clarity on what each page depends on (instead of letting front-end request anything they want in any part of the view). I personally prefer server-side frameworks. I also understand when a front-end team prefers to work a certain way, has a lot of knowledge and tooling built-up around a certain way, and is worth accommodating for that reason.