I often have to design client APIs for use by other programmers. The language can vary from Ruby, Java, Erlang and Javascript (Mootools). Does anyone have any tips on creating a very usable API. And yes, this "is" a very subjective question and I am asking so that I can make my APIs easier to use by others.
+1
A:
watch this: http://video.google.com/videoplay?docid=-3733345136856180693#
To add details this is a video of lecture given by Josh Bloch who's a senior java bod at Google. It's excellent if you want an overview on issues to consider when making an API
dangerstat
2010-02-21 18:07:37
Your link didn't work, it says the video is unavailable
Zubair
2010-02-21 21:06:11
+1
A:
I strongly recommend to follow Joshua Bloch's advice: Joshua Bloch - How to Design a Good API and Why it Matters. It's available in PDF and Video.
BalusC
2010-02-21 18:11:01
+1
A:
A few ideas:
- Make your method names very descriptive
- Use documentation to clearly indicate parameters and return values
- Follow YAGNI and KISS
- Nothing helps like code examples... lots of them covering lots of use cases
Dave Swersky
2010-02-21 18:11:27
A:
If you have are interested in some non-free alternatives, then the following book would be a good recommendation:
Practical API Design: Confessions of a Java Framework Architect by Jaroslav Tulach
Waleed Al-Balooshi
2010-02-21 19:19:15