Brilliant Presentation On API Designon Feb 04, 2010 in Coding, QA by John Evans
Many of our Caplin Xaqua and Caplin Trader components can be customized and extended, and we provide APIs that allow our customers to do this. Indeed, some components, such as the StreamLink and DataSource SDKs consist entirely of APIs that are used to build working applications. The StreamLink API connects client applications with Liberator to provide streaming data, and the DataSource API is used to build DataSource adapters that connect Caplin Xaqua to a bank’s price data and trading systems. So Caplin’s developers frequently have to design, code, test and document APIs.
As one of Caplin’s technical authors I have a particular interest in the documentation side of this, but also, in a previous role as a software engineer at another company, I spent a lot of my time designing and developing APIs. At Caplin we are constantly looking at how to improve our APIs and make them easier for our customers to use. So I did a bit of research and discovered some really good material on API design from Java guru Joshua Bloch (http://en.wikipedia.org/wiki/Joshua_Bloch).
Some of the stuff at the end of his presentation is specifically about Java, but the first half applies to API design in pretty much any language environment. He offers a sort of apology for the “motherhood and apple pie” nature of the first few slides, but I don’t think his ideas need any apologies; they are just spot on.
You might also find these items about APIs interesting:
- Inadvertantly Abstract (Adam Iley, Caplin) – A discussion of Zed Shaw’s essay (see link below
- Indirection Is Not Abstraction (Zed Shaw)