how to design a good api and why it matters
2017-04-02 13:53
495 查看
http://www.open-open.com/doc/view/ceee1d75382f4bbc93c8a8a2a98b4e52
Characteristics of a Good API
• Easy to learn
• Easy to use, even without documentation
• Hard to misuse
• Easy to read and maintain code that uses it
• Sufficiently powerful to satisfy requirements
• Easy to extend
• Appropriate to audience
General Principles
API Should Do One Thing and Do it Well
API Should Be As Small As Possible But No Smaller
Implementation Should Not Impact API
Minimize Accessibility of Everything
Names Matter–API is a Little Language
Documentation Matters
Effects of API Design Decisions on Performance are Real and Permanent
API Must Coexist Peacefully with Platform
Characteristics of a Good API
• Easy to learn
• Easy to use, even without documentation
• Hard to misuse
• Easy to read and maintain code that uses it
• Sufficiently powerful to satisfy requirements
• Easy to extend
• Appropriate to audience
General Principles
API Should Do One Thing and Do it Well
API Should Be As Small As Possible But No Smaller
Implementation Should Not Impact API
Minimize Accessibility of Everything
Names Matter–API is a Little Language
Documentation Matters
Effects of API Design Decisions on Performance are Real and Permanent
API Must Coexist Peacefully with Platform
相关文章推荐
- How to Design a Good API and Why it Matters(转)
- How to Design a Good API and Why it Matters
- How to Design a Good API and Why it Matters
- 【Testable Code】Unit Tests, How to Write Testable Code and Why it Matters
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- Responsive Web Design: What It Is and How To Use It
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- Why and how to design routines of class
- Why to use memory pool and how to implement it
- (Page 3 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- Why we made vorlon.js and how to use it to debug your JavaScript remotely
- (Page 2 of 3 )A walking tour of JavaBeans 2 :What JavaBeans is, how it works, and why you want to use it
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- (Page 1 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- Discover Feature Engineering, How to Engineer Features and How to Get Good at It
- Why do we need smart pointer and how to implement it.
- TensorFlow: How to freeze a model and serve it with a python API
- Why Prepared Statements are important and how to use them "properly"