码迷,mamicode.com
首页 > Windows程序 > 详细

how to design a good api and why it matters

时间:2017-04-02 14:37:43      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:access   cte   exist   sig   tar   oss   orm   href   -o   

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

标签:access   cte   exist   sig   tar   oss   orm   href   -o   

原文地址:http://www.cnblogs.com/soul-stone/p/6658868.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!