最佳实践和准则设计API [英] Best practices and guidelines for designing an API
问题描述
有哪些指导方针和我能坚持在设计一个API的最佳实践?
在最低限度,我知道一个API应该是易于使用和灵活。不幸的是这些条款可以是相当主观的,所以我一直在寻找与良好的API设计的一些具体的指导方针。
What are some guidelines and best practices that I can adhere to while designing an API? At the bare minimum, I know that an API should be easy to use and flexible. Unfortunately those terms can be rather subjective, so I was looking for some concrete guidelines relating to good API design.
推荐答案
我发现下面几点是值得关注
约书亚布洛赫 - 如何设计一个良好的API和重要性
I found the following to be worth a watch Joshua Bloch - How To Design A Good API and Why it Matters
例子是Java,虽然,但仍可以画等号。因为你没有提到具体的技术;我以为你不想要的利基解决方案。
The examples are in Java though but still you can draw parallels. Since you didn't mention a specific technology ; I assume you don't want niche solutions.
这篇关于最佳实践和准则设计API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!