API's
Written by: Doug Jenkinson
Article
One of the things I try to do in my applications (including web-based dynamic sites) is have some sort of API. I don't mean that common library you include in everything you write. (You do have some common used functions you've written in a personal library don't you? Your own personal toolbox, so to speak?)
I'm referring to a set of functions made available to developers other than you. That does not have access to the source code of your program, but rather the documentation of your API. To extend, to reuse, your application beyond its original intended purpose.
In another case, the interface could be provided to a module/plug-in/extension framework. Allowing the customized code to take advantage of the functionality your application delivers coupled with the new features.
This is a nice little feature that allows other developers to do things with your application that you never thought of. For example, Microsoft Word: it may be just a glorified text editor, but you can actually instantiate an instance of the application, open, edit, and save documents. That's automated efficiency right there. Bosses love that sort of thing. As for another example, Google Maps: just take a look at all of the Google + whatever mashups out there that developers have created.
Next time you’re writing an application or dynamic website, think about its evolution. Is the code you're writing the sort of thing that other developers might want to use? And there's your API. Some of the people in your audience just might have a really nifty use for your application that you hadn't even considered.
Revisions
- v1.0 (20 Jan 2006) - Article published.

