I'm heading up the API design for my company's next gen software package and was wondering if anyone knows of some good resources that deal with designing an API. Books or web resources would be great. The specific language is not important as we will be supporting multiple langauges (C++, Java, Perl, and possibly others) so I'm just looking for the general guidelines.
Good article on API design
Fortunately, I'm a subscriber and have the issue here at my desk. Thanks.
I've always like Object Oriented Software Construction by Bertrand Meyer. The second edition however isn't as good as the first (although it is much much longer).
There's a book especially for API design: http://www.amazon.com/exec/obidos/ASIN/0201498413/ .
Oh yeah, re-read the "Candy Machine Interfaces" section of "Writing Solid Code" too :)
I think the "C Interfaces and Implementations" book is overrated. It's mostly just some example code that the author is trying to show off.
"Effective Java" by Joshua Bloch has a very strong bias of API design. Well, it's written by the lead Sun architect and the author of Java Collections. And it's one of the best Java books so far.
Zwarm, I couldn't agree more about "Code Complete".
Yoy may also find "Design Corner" of Bill Venners
Chapter 4 of Kernighan & Pike's "The Practice of Programming" has a good treatment of designing interfaces.
With APIs you unfortunately follow that excellent piece of advice: Plan to write two, you'll have to throw one away anyway.
Correction: With APIs you unfortunately can't follow that excellent piece of advice
Fog Creek Home