APIs – The Basics
- application programming interface
- 2 types – RESTful and RPC
- offers ability to share data and functionality
- centralize functionality
Possible Problems
- poor planning can cause poor usability
- needs to be accessible across multiple langauges
- variable scope may not exist / be accurate
- documentation needs to be extensible
- security can be tested/attacked
The biggest security threat to your API
- you!
Documentation
description, parameters, example call, example response, error code
Great Examples
twitter, flickr, digg, openOffice
Development Process of an API (ideal)
- create use case
- document
- test documentation
- code API
- test
- hack
- go to 4
Creating a RESTful-ish API
- URL parsing
- request type parsing
- XML responses
- requires authentication
- error handling
Resources
InfoQ article – REST Intro – infoq.com/articles/rest-introduction
Post a Comment