首页 > 代码库 > how to design a good api and why it matters
how to design a good api and why it matters
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
how to design a good api and why it matters
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。