Re:An API is a user interface
by sethammons on Wednesday November 25, 2020 @08:17AM
(#25208874)
Documentation driven design.
I nearly always start at the exposed API and try to make it make sense, then design code and models that enable that interface. The API is your product.
This is exactly what I do. Before I even think about the internals of a function, module or endpoint, I imagine that it exists in the ideal form that I or any other programmer would want, and then write a few usage examples. Then I pick the best one and implement it.