Colorado Timberline APIA Practical Guide to Successful Integration

Binding Approach

One of the greatest design decisions in any API client is how to bind to the API. There are two options here, one is binding at a protocol level, the other is binding at a library level. Binding at a protocol level means you must be aware of low-level details, for example the technology used in the transmitted data; is it JSON, XML, serialized PHP, a custom format etc. Binding at a library layer abstracts the protocol from the developer, requiring you only need know the language in which the library is written.

Illustration of API stacks using protocol and library binding

CT has just started implementing API client libraries. The premiere library will be written in PHP; .NET (C#), and Java libraries will be available shortly thereafter. CT suggests you consider client libraries because they add a layer of indirection to the stack. If the protocol changes, CT can ship a new revision of client libraries that transparently abstract the change. All you would need to do in that case is install the latest version of the library, rather than make code changes. Another benefit is bugs or features CT works on for one client will be rolled into the global product where all clients can benefit.

Once you’ve chosen a binding approach, you can move on to the fun stuff, namely placing orders!  In order to accomplish that, you’ll have to learn about the nomenclature of CT products.