4 ms·
I think it's time to admit that REST is at best a hack as front-end devs don't want to deal with implementing RPC in the browser, even when building complex des
by lastofus 9y ago
I think it's time to admit that REST is at best a hack as front-end devs don't want to deal with implementing RPC in the browser, even when building complex desktop replacement apps.
A formal spec will not fix the flawed notion that any/all protocol msgs can be mapped to what are essentially CRUD HTTP verbs, or that the underlying HTTP protocol was fundamentally designed for serving hypertext documents and accepting occasional form data.
- ahoka 9y agoA few years ago I thought that using RPC is archaic and bad design. Now with more experience I think that RPC is actually very useful for real world applications. For simple CRUD REST is wonderful, it takes effort, but you can model a lot of things with resources. But when it comes to performance and more conplex data collection it's hard to scale. Now that we have the need for batch operation we ended up with a mix of rest and roll-your-own RPC throught POST endpoint. It led me to think that maybe we should use REST only on external APIs for easy consumption and go full RPC between our services. Also JSON is so verbose for sending over the network. Oh and compressing it over HTTPS is a no-go, because of BREACH and CRIME.
- majewsky 9y ago> maybe we should use REST only on external APIs for easy consumption and go full RPC between our services That implies that you have a clear distinction between external and internal APIs that doesn't change over time. Lucky you.