API Design

A good design for an Application Programming Interface (API) can speed up development. But what is a good API design? My short list, based on using them, for a good design:

  • I should not be hassled with tedious initialization. In my networking class, I was required to use the standard C network library. This requires a function call for near each stage of creation of the network connection, which I quickly pushed into a function that took the simple parameters for the IP address or URL and the port number. The function shaved off at least ten minutes for my next projects.
  • I like it when I can make a guess the name of a call (method or function) which this again saves me time from having to look it up.
  • Documentation. I will need to look up information at some point about the API.