API Design Matters
summary
Argument: APIs outlive implementations so design for clients first not implementation. Claims: make APIs easy to learn, minimize surprises, prefer clear names, readable client code, and hard-to-misuse interfaces that avoid ordering and side‑effect coupling. Shows a concrete broken case: Ruby net/http with inconsistent signatures, side‑effecting get_print, and redirect‑by‑exception behavior. Contrasts working tools: Typhoeus, Faraday, open‑uri. Practices: write sample client code, pick good defaults, separate API and SPI, and use semantic versioning for public libraries.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 0:17How many out there
- 1:07API is our product
- 1:35API outlives implementations
- 2:04API leads everything else
- 2:16Principles
- 2:31Easy to Learn
- 3:06readable code
- 7:02Examples
- 7:43Consistency
- 8:57Clarity
- 9:16Convenience
- 10:12Conciseness
- 10:38Example
- 16:23Shortcut
- 16:41Post
- 16:58Faraday
- 17:48Open URL
- 18:06Basic Usage
- 18:37Techniques
- 19:45Implementation
- 20:28Client API
- 22:01API Design Manual
- 22:40Questions
- 23:21Refactoring
- 23:50Chocolate
- 24:33All code is stuff
related talks
37mYes, You Should Provide a Client Library For Your API
22mBuilding the Great Wall: API Driven Applications
42mBuilding Better Web APIs with Rails
45mThe illusion of stable APIs
42mWeb API's with ERLANG a Ruby Dev's POV
41mAPPLICATION ARCHITECTURE: BOUNDARIES, OBJECT ROLES, & PATTERNS
30mBringing UX to Your Code
35mBuilding Ambitious APIs with Ruby
