3 ms·
If you control both ends of an API, there's no reason not to use Thrift or equivalent (gRPC) rather than untyped JS. Even if you don't believe in typing in gene
by lmm 7y ago
If you control both ends of an API, there's no reason not to use Thrift or equivalent (gRPC) rather than untyped JS. Even if you don't believe in typing in general, an API boundary is exactly where it's most important to make sure both sides agree on what the interface is.
- nice__two 7y agoAbsolutely! If you don't do this, you're just building the next unmaintainable distributed monolith.
- jpdb 7y agoCalling gRPC endpoints from the browser isn't something that works very well today.
- lmm 7y agoCalling thrift endpoints from the browser works great. I had heard that gRPC was a thrift equivalent but haven't used it myself.
- ledauphin 7y agoGraphQL works well for this also if that's an option in your stack. It advertises lots of benefits but the enforced schema types are worth the price of admission even if you're doing simple CRUD with no graphs.