REST Clients
summary
Redbooth uses one API for web, iOS, Android, Gmail and Outlook clients and integrates with Dropbox, Box and Evernote; this forces design choices: avoid client-held state by fetching authoritative state from server, represent side effects with use POST for actions and return Link headers to mutated resources, prefer conditional updates with PATCH using JSON Merge Patch for simple deltas (JSON Patch only for deep ops), return async 202 + token for long jobs and support cached timestamps for efficient syncing.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:31One API to rule them all
- 1:46Business development "for free"
- 3:16Render on the client • More Integration test - Backward compatibility • Coordinate API and client implementations
- 4:17Render on the client • More Integration test • Backward compatibility • Coordinate API and client implementations
- 5:59Constrains set you free
- 6:51Development in parallel
- 7:34Stateful is hard: Server and client's state will diverge
- 8:43Side effects? Can be RESTful too
- 10:49Use the Link HTTP header to tell the client to re-fetch a resource
- 11:51Minimize impact of race conditions with PATCH instead of PUT
- 14:51Nested resources are troublesome
- 15:28Perceived speed
- 16:24Asynchronous operations
- 16:42Offline and Caching strategies
- 16:53Store the data and the cache's timestamp. Next time request only changes and merge them.
- 17:15Build an API for the clients
related talks
09mOutlook REST APIs in Preview
40mGive It a REST – Tips for Designing and Consuming Public API’s
28mBuilding in Rails, Backbone, and CoffeeScript
18mRethinking Apps with Local-First Architecture
34mOffline-First Mobile App Design
26mBuilding Real-Time Multi-User Apps With JSON Patches
24mBuilding Realtime Singlepage Apps
38mAdvanced API Design for Scalable Distributed Systems
