The Value of Web APIs
The terms "Web API" and ""API-first development" have been gaining a lot of traction in recent months. Yet, the term API - or Application Programming Interface - is quite vague and may apply to a variety of application development components. At its most general, it's a set of function/routines, protocols, and tools for building software applications. With regards to its role in Web development, the primary focus is on a piece of code that allows two software programs to communicate with each other. More specifically, the API defines the correct way for a developer's code to requests services from a vendor's service provider component. The vendor describes the required syntax in their public documentation and may even provide tools that generate the code for you. In today's article, we'll explore some of the ramifications and benefits that API-driven development offers the provider, user, and of course, you, the developer.
Examples of Popular APIs
Benefits of Web APIs
Much like Object-oriented programming (OOP) did a few decades ago, APIs encourage modularity, separation of concerns, and the hiding of internal complexities. OOP has shown us that modular code is easier to test, maintain and update. It's the ultimate in black box programming. All you need to concern yourself with is the API for using a particular library. Once you've got that down, it should just work! Moreover, as long as the API remains intact, individual components can be swapped in and out without any ill effects.
The target audience of Web APIs are usually developers or web-savvy Do-it-yourselfers, whomever is incorporating a service into a web page. Having said that, end users and the API providers also reap the many rewards of an API. Here's how each of these groups benefit in their own way:
- Web Developers: Web APIs save developers from having to code advanced functionality and features whose subject matter they may have little knowledge about, for instance geocoding, charting, weather forecasting, probability analysis, etc... APIs tend to offer the opportunity for greater customization and flexibility than standard widget components. APIs also benefit developers by:
- enriching functionality: features which are not available on a device or provided by an operating system can be invoked via Web APIs
- combing multiple services: completely new operations can be designed by mixing and matching several APIs
- integrating more quickly and easily: API technologies make registration and integration much easier for developers, compared to more outdated approaches (like downloading widgets and kits)
- End Users: Incorporating one or more good Web APIs into one's website can greatly increase its usefulness, enhance interactivity, and just make it more interesting in general.
- API Providers: Adoption by the web development community can supply the API provider with invaluable advertising by:
- building brand loyalty
- spreading the word about the company's products and services
- increasing website traffic
- providing useful tools to consumers
- conveying company ideas and messaging
Not to mention, the API itself can become a money maker if the provider charges for the API or for an advanced version of it.
Web APIs have been catching on so well that there is an emerging trend in web development called "API-first" approach, in which the underlying API(s) is/are selected or built before UI components. This strategy makes perfect sense when you consider that both websites and mobile apps will need to interact with the same processes and data. This is not to say that this approach is always the superior one, but if you do decide to integrate a third party API, make sure that it works properly, is easy to integrate, and fits the user's needs. Once you've become adept at working with APIs, you may even consider taking advantage of the booming API market and get into developing APIs yourself.
Rob Gravelle resides in Ottawa, Canada, and is the founder of GravelleWebDesign.com. Rob has built systems for Intelligence-related organizations such as Canada Border Services, CSIS as well as for numerous commercial businesses.
In his spare time, Rob has become an accomplished guitar player, and has released several CDs. His band, Ivory Knight, was rated as one of Canada's top hard rock and metal groups by Brave Words magazine (issue #92) and reached the #1 spot in the National Heavy Metal charts on Reverb Nation.