Effective API development: How to create a beautiful Java API

Video:

Effective API development: How to create a beautiful Java API

By Cameron McKenzie

TheServerSide.com

How do you create a beautiful API? Knowing that effective API development is as much an art as it is a science, TheServerSide posed this very question to MikeAmundsen (@mamund), the Principal API Architect at Layer 7 Technologies in Vancouver, British Columbia. The short answer? "Treat the API as a product."

If you're thinking of your application programming interface (API) as simply a mechanism for exposing the external classes and components that make your product or service work, you're approaching the task of building your APIs from completely the wrong angle. A public API shouldn't have such a banal purpose as to simply expose the internals of a product or service to which developers wouldn't otherwise have access. Exposing internals may be the net effect of a public API, but that's not how an organization should approach an API's development.

"You're specifically crafting a product for a market; that is going to solve a problem," Amundsen said. And, to that effect, API developers should be thinking about the problem they are solving, not the components that need exposing. By taking a problem-based approach to API development, organizations will be developing a solution to the client need, and the exposure of internal components through the API that results will elute in a natural and organized way.

"Don't create APIs that simply expose objects or components or data, but one that actually solves a real problem," Amundsen said. "If you design it to solve a problem, you're going to have people flock. "

 

Follow Cameron McKenzie on Twitter (@potemcam)

 

Recommended Titles

Programming Android by Zigurd Mednieks
JavaScript & jQuery: The Missing Manual by David Sawyer McFarland
The Definitive Guide to HTML5 by Adam Freeman
Cracking the Coding Interview: 150 Questions and Solutions by G.L McDowell
The Google Resume: Landing a Job at IBM, Apple, Microsoft or Facebook by  G.L McDowell

07 Feb 2013

Related Content

Related Resources