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 documen...

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

 

目录
相关文章
|
3月前
|
API
SAP Fiori Elements 针对 OData V2 和 V4 的 Extension API
SAP Fiori Elements 针对 OData V2 和 V4 的 Extension API
26 0
|
6月前
|
API
什么是 SAP Commerce Cloud SmartEdit 的 preview API
什么是 SAP Commerce Cloud SmartEdit 的 preview API
43 0
|
6月前
|
开发框架 容器
SAP UI5 Flexible Programming Model Explorer
SAP UI5 Flexible Programming Model Explorer
40 0
|
7月前
|
Web App开发 前端开发 API
关于 SAP UI5 Device API 的使用介绍
设备 API ( sap.ui.Device ) 是一个 API,它提供有关设备细节的信息,例如操作系统及其版本、浏览器和浏览器版本、屏幕尺寸、当前方向以及对特定功能的支持,如触摸事件支持, 方向变化等等。
53 0
|
10月前
|
安全 Unix Shell
读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 5: Process API
读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 5: Process API
69 0
|
API 语音技术
Speech Synthesis API
Speech Synthesis API
355 0
|
IDE Java API
REST Assured API Automation Testing Ⅰ - Getting Started
REST Assured API Automation Testing Ⅰ - Getting Started
REST Assured API Automation Testing Ⅰ - Getting Started
|
API Android开发
一文详解 implementation api embed
**implementation:** + 依赖`不具传导性`,引入的API仅Moudle可见; + `参与Moudle的编译、不参与对应AAR打包`,但参与整体Apk打包; **api:** + 依赖`具备传导性`,依赖该Moudle的其他Moudle也可调用引入的API; + `参与Moudle的编译、不参与对应AAR打包`,但参与整体Apk打包; **embed:** + `合并AAR`:将引入API对应的AAR工程合并到该Moudle工程,打包成为一个全新的AAR; + 依赖`不具传导性`:引入的API仅Moudle可见;
529 0
一文详解 implementation api embed
SAP Spartacus 使用 customized API
SAP Spartacus 使用 customized API
101 0
SAP Spartacus 使用 customized API
SAP Cloud for Customer用ABSL消费Restful Mashup API
SAP Cloud for Customer用ABSL消费Restful Mashup API
SAP Cloud for Customer用ABSL消费Restful Mashup API