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."
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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. "
You should follow Cameron McKenzie on Twitter: @cameronmcnz
Interested in more articles and opinion pieces from Cameron McKenzie? Check these out:
- Why the Amazon S3 outage was a Fukushima moment for cloud computing
- Software ethics and why ‘Uber developer’ stains a professional resume
- It was more than user input error that caused the Amazon S3 outage
- Don’t let fear-mongering drive your adoption of Docker and microservices?
- Stop adding web UI frameworks like JSR-371 to the Java EE spec