Hacker News new | past | comments | ask | show | jobs | submit login

Ignore all the noise and just use an RPC model between your backend and frontend. All these stupid trends and overengineered abstractions will come and go, but people will still be using plain RPC in 5, 10, 100, and 1000 years.



But before you use RPC, try rendering your markup on the server. That, too, reduces a lot of complexity.


At cost of reducing cache ability though no?

It is cheaper for me to put my react app in front of a cdn, split out my app into an api and front end than for me to have my site be entirely uncacheable.

I can also cache certain endpoints behind the cdn that are mostly invariant for users. And, the network egress of json is much lesser than the egress of markup.


What? Server rendered content is infinitely more cacheable, maybe I'm not understanding what you're saying.

In the boring old days we just did it all on the server and used the semantics of HTTP to handle caching ... it worked great.


If you are truly concerned about network costs, I'd recommend rendering an XML model on the server and using a cached extensible stylesheet (XSLT) to render your HTML on the fly, on the client.


and let all the non-browser clients parse html?


No, that's the RPC part.


The longer I do this the more I realize the part of engineering most of us enjoy is solving a problem in a novel way. Which means if left to their own devices engineers will recreate the entire tech stack every few years instead of using the shit we've already built 20 years ago cause it's too boring.


Resume driven development. It's the same shit: reinvent stuff. Use "cutting edge" tech. Get credit, move on. Who has time to just solve the problem and build something that just works?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: