The Age of the API is upon us, presenting developers with new opportunities to generate income by linking to the data and services of others. But developers need to be careful when navigating the new API landscape.
Although the term (short for "application programming interface") has been around for decades, APIs have taken on a whole new life lately, spawning development of a wide range of multifunctional APIs and now management software companies to help businesses cope with the burgeoning wealth of available options.
APIs, in fact, are becoming a successor to SOA (service-oriented architecture) , providing easier mechanisms for service access than SOA's highly technical approach, says independent consultant Kin Lane: "APIs have jumped out of the petri dish of the enterprise."
Developers need to have a basic tool set for using APIs in the language of their choice, Lane advises. Those tool sets typically come with the API libraries, but there are also standard ways to consume APIs in languages such as PHP and Java. In addition, developers need to note that APIs can be withdrawn, as has occurred both at Twitter and Facebook, leaving third-party apps in the lurch.
Dealing with poor APIs
The current craze has spawned thousands of APIs, so developers need to be mindful of the varying quality of what is available, Lane says. "I see a lot of people make APIs. They think they understand APIs, but they've never really used APIs that are already in existence, so they don't emulate a lot of the healthy design patterns. They make a lot of the same mistakes over and over." These mistakes include APIs that break or that don't work well in mobile applications.
Other flaws in many APIs relate to security, simplicity, and scalability, says Dan Raju, CEO of cloud-based financial services vendor Tradier. Also, having only one version of an API is a good idea, says Chris Caselas, a developer at video syndicator RealGravity. Multiple versions of APIs can create issues such as incompatibility with the previous release, Caselas notes. "You should probably do it right the first time."
Poor API design usually keeps developers from using them, says Pamela Fox, a front-end engineer at online educator Khan Academy. But some poorly designed APIs -- such as Facebook's -- can't be avoided, she notes. Another example is the Google Maps API, which requires developers to sign up and use a key, to many coders' annoyance. "That just lowered the barrier for signup," prompting Google to eventually get rid of it, Fox recalls from her stint in Google's developer relations team.
Sign up for Computerworld eNewsletters.