What is the 'API-First' design approach and what artifact does it produce before any code is written?
- A.API-First means the API is deployed first before the frontend UI is designed
- B.API-First is a security approach requiring all API endpoints to be documented before release
- C.API-First design produces the API specification (OpenAPI/AsyncAPI document) before any implementation code. Teams agree on the API contract (endpoints, schemas, authentication) upfront, enabling parallel frontend and backend development against the spec. Benefits: earlier design review, mock servers from the spec, contract testing, and documentation that stays in sync with implementation
- D.API-First means all application logic is in the API layer with no server-side rendering
Why C is correct
API-First (Design-First) workflow: (1) Define the API in OpenAPI spec with team consensus; (2) Review and iterate on the spec (cheap changes); (3) Generate mock servers (Prism, Stoplight) - frontend starts building against mocks; (4) Backend implements against the spec; (5) Contract tests validate the implementation matches the spec. This contrasts with 'Code-First' (implement, then generate docs from code). API-First produces better-designed APIs because design decisions are made explicitly rather than emerging from implementation constraints.
Know someone studying for Web App Fundamentals? Send them this one.