3 ms·
XMLHttpRequest does not have a remote procedure call (RPC).
by darkhorn 8y ago
XMLHttpRequest does not have a remote procedure call (RPC).
- continuations 8y agoI meant what's the advantage of using RPC instead of XMLHttpRequest to communicate with the server.
- skybrian 8y agoWell, XMLHttpRequest alone doesn't cover much so you're really comparing with HTTP requests combined with JSON and whatever you use to document your JSON API. The advantage of protobufs is basically static typing with backward-compatible serialization (you can add new fields), that's compatible with many server-side languages. It's honestly an awkward fit for web apps, though. Basic things are different, like int64's aren't native to JavaScript.