Practical API Design
Practical API Design
Practical API Design
● Jaroslav Tulach
●
Sun Microsystems
http://www.netbeans.org
• Must be:
> a) beautiful
> b) correct
> c) simple
> d) good performance
• Not necessarily!
http://apidesign.org
What makes a technology good?
• Coolness
> before adoption
• Time to market
> at beginning of adoption
• Total Cost of Ownership
> then and forever
http://apidesign.org
API is a technology facade
http://apidesign.org
Rules for Successful API design
http://apidesign.org
Evolution
http://apidesign.org
Backward Compatibility
• Source
> ability to compile against new version
• Binary
> ability to link to new version
• Functional
> ability to compute the same result
http://apidesign.org
Evaluation of an API Quality
http://apidesign.org
The Amoeba Model
http://apidesign.org
The Amoeba Model
http://apidesign.org
The Amoeba Model
http://apidesign.org
API Fest
• Agile to ad-absurdum
• Only about evolution
• Not a beauty contest
• Evaluated by you
http://apidesign.org
API Fest '08 Roadmap
http://apidesign.org
API Fest Don'ts
http://apidesign.org
API Fest Gotchas
http://apidesign.org
Questions & Answers
Practical API Design
Confessions of a Java Framework Architect
ISBN-10: 1430209739
Jaroslav Tulach
http://www.apidesign.org