API Design Patterns
REST, GraphQL, and gRPC are the three dominant API styles, each optimised for a different context. REST is the standard for public APIs and browser clients — stateless, cacheable, and universally understood. GraphQL solves over-fetching for complex UIs — clients declare exactly the fields they need. gRPC uses Protocol Buffers over HTTP/2 for high-performance service-to-service calls — binary encoding is smaller and faster than JSON, with first-class streaming support. API versioning prevents breaking changes from reaching existing clients. URL versioning (`/v1/`, `/v2/`) is explicit and easy to route. Deprecation requires a sunset period — announce the timeline, log usage of old endpoints, and monitor adoption before removal.