Photo by Helloquence on Unsplash (Edited)

The Contract

The importance of getting the API correct and the initial design of the API.

Andrew Howden
2 min readSep 11, 2019


💡 I am now writing at Check out this article over there!

The Contract

The fundamental assumption I am making with this application is that it will be consumed over the network. There are two different was we can express the internal state of this application over the network:

  1. As a rendered user interface to be consumed by a browser
  2. As an interface through which clients can make specific remote procedure calls (RPCs) and receive structured information but no user interface

Generally speaking I strongly prefer the latter approach.

To render or not to render

In small teams and within a limited use case the first approach in which the user interface (via HTML documented) makes some sense. It is:

  • Well supported
  • Quickly shippable
  • Easy to reason about

However, in my experience it runs into a couple of issues if ether of those assumptions start to fail.

😲 Oh no! The remaining article is gone!

Don’t worry. You can still check it out at!

I’m moving most of my content to a personal website, powered by SubStack. This is because I’m writing there in future, and I want to centralize all of this material there rather than have some writing in one place, and some in another. While I appreciate this is annoying, this content will be available there for you going forward, and you’ll even be able to subscribe to some new and (hopefully interesting) work!

Thanks ♥