我不想写一本书,我想我会找到一些好的建议,说明如何写好一本书。
当然,我进行了权宜之计的搜索,但从Dustin Diaz 中删除。 我确实未能找到好的建议。
What are things that you wish you had done differently when creating an API? What made the biggest difference.
我假定我会使用 o。
我无意中不提供复印件的细节,因为我期望提出更多的一般性建议,希望这些建议对更多人有用。
我不想写一本书,我想我会找到一些好的建议,说明如何写好一本书。
当然,我进行了权宜之计的搜索,但从Dustin Diaz 中删除。 我确实未能找到好的建议。
What are things that you wish you had done differently when creating an API? What made the biggest difference.
我假定我会使用 o。
我无意中不提供复印件的细节,因为我期望提出更多的一般性建议,希望这些建议对更多人有用。
要点 我建议你研究:
此外,你认为,在这方面有一些联系是有益的:
http://www.slideshare.net/eaton/building-apis-that-rock
http://www.notiondesign.ca/blog/story/how-not-to-build-an-api/
http://blog.apigee.com/category/api_best_practices/
http://blog.isnotworking.com/2007/05/api-design-guidelines.html
此外,这本大书有助于你启动:
I don t think the language-agnostic tag is appropriate for this question, and moreover, it needs a specific language tag. Designing a good API requires a consideration of the characteristics and idioms of the language you re working with. Some of the most important considerations:
So the best piece of advice I can offer to your question as it stands (language-agnostic) is not to assume there are language-agnostic universal API design guidelines, and instead get to know the language(s) you re working with and the appropriate idioms.
给予信贷
http://sharismlab.com/blog/2012/07/21/how-to-write-an-api-for-your-web-app/
Understand how users are going to use your application. If you can able to note down all the usecases of your application then you can implement each usecase as part of API. At the end of the day you will have an API which provides set of usecases that you decided. Further you should able to extend API with expansion of usecases and should be able to maintain backward compatibility.
API implementation for Web services:
Decide which protocol, data formats and authentication you need to use.
Most of the web services implement API with following parameters.
Protocol: HTTP
Dataformat : JSON/XML
Authentication : API key/Oauth
API implementation for libraries and SDK:
Create prototypes which should be frozen through out life.
Expand API by adding extra functions and do not change existing functions prototypes.
Allow users to provide as many inputs they can as arguments to functions.
So the application can do its job as user requested to do.
Keep user in mind and API should allow user to use it with minimum effort.
Refer:
An Introduction to APIs : https://zapier.com/learn/apis
I was looking at XML-RPC for a project. And correct me if I m wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else? Am I missing something? ...
Does a Polymorphic engine have any other uses besides writing viruses?
I have the following available: last reported lat,lon w/timestamp target lat,lon estimated time to target heading How can I interpolate an estimated position over time? I know that s enough to ...
I am creating a desktop app that will create some reports. I want to export these reports as RSS or ATOM feeds. I can easily create feeds with Rome lib for Java. But I have no idea how to spread them. ...
I am currently using Q-Learning to try to teach a bot how to move in a room filled with walls/obstacles. It must start in any place in the room and get to the goal state(this might be, to the tile ...
If you were planning on building a high-traffic, very secure site what language would you use? For example, if you were planning on say building an authorize.net-scale site, that had to handle tons ...
According to various sources, such as Wikipedia and various .edu websites found by Google, the most common ways for a hash table to resolve collisions are linear or quadratic probing and chaining. ...
Recently, I ve been learning different programming langages, and come across many different names to initalize a function construct. For instance, ruby and python use the def keyword, and php and ...