API Design

Published:

Recently at Songbird I've been working on some guidelines to help us build better APIs. One of the most exciting things we're hoping to offer users and developers are APIs that give them access to their music and the ability to extend their and others' music players. Getting these APIs right can be hard and we think we can do better, so we came up with some ideas and we're trying to get some wider feedback.

Our guidelines come in two parts - general rules that apply across the board, and platform-specific conventions depending on what the specific APIs are based on (Mozilla Extension API vs Web Page JavaScript). Here's our general guidelines:

These are based on research I did - I distilled half a dozen other peoples' ideas about good API design into ones that we could easily apply to our own work.

The full document fleshes these out a little more, with examples and then goes into platform specific patterns to follow.

If you're interested, read it and please send your comments.