API-DD

API-DD library · Page 2 of 2

Articles on designing modules as APIs

Practical guides about conversations, guarantees, and boundaries between modules. If this is your first visit, start with the API-Driven Development manifesto.

  1. The single-implementation interface that increases coupling

    A conventional UserServiceInterface forces different consumers to depend on the same broad contract and shows when the interface belongs to the consumer.

    Read article →Explore: Foundation 1: Recursion →

  2. The getter that lets a consumer modify the module

    A seemingly innocent Go getter returns its internal slice, letting consumers change the module and making previously returned results change unexpectedly.

    Read article →Explore: Foundation 4: Autonomy →

  3. The type that turns a SQL change into an interface change

    A Go example of an innocent-looking dependency: returning sql.Rows makes the consumer understand the query and turns internal changes into interface changes.

    Read article →Explore: Foundation 3: Visibility →