关于学习API的指导 [英] Guidance on learning API's

查看:90
本文介绍了关于学习API的指导的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力理解API - 我知道它代表Application Prorgramming Interface并查看了维基百科提供的大纲https://en.wikipedia.org/wiki/Application_programming_interface



但是,我还是有点不清楚。



从我迄今为止在调查中发现的内容中有各种API,包括win32 API和Web API。似乎有特定于应用程序的API和操作系统API。这是正确的吗?



win32 API的类是用C#等语言实现的,是作为Windows服务或DLL安装到Windows操作系统中实现的,还是只是引用的类一个应用程序使用类方法等?如果APi可以设置为DLL甚至是Windows服务,它们是否可以使用操作系统功能?



API似乎也提供了一个应用程序提供的应用程序第三方但我认为这些仅限于暴露和使用第三方应用程序的功能吗?



我有兴趣学习如何在Windows上创建APi和Unix \Linux,并想知道是否有人可以提供任何学习这些资源。

I am trying to fuly understand API's - I am aware it stands for Application Prorgramming Interface and have looked at the general outline provided by Wikipedia https://en.wikipedia.org/wiki/Application_programming_interface

But, I am still a little unclear.

From what I have found so far in my investigation there are various API's including win32 API's and Web API's. There appears to be application specific API's and operating system API's. Is this correct?

Are win32 API's classes in a language such as C# and implemented as Windows services or DLL's installed into the windows operating system or are they simply classes referenced by an application to use the classes methods etc? If an APi can be set up as a DLL or even a Windows Service can they utilise operating system functions?

API's also seemed to be provided with an application provided by a third party but I am correct in assuming these are limited to exposing and using functionality of the third party application?

I am interested in learning how to create APi's on both Windows and Unix\Linux and wondered if anyone could provide any resouces for learning these.

推荐答案

Quote:

似乎有特定于应用程序的API和操作系统API。这是正确的吗?

There appears to be application specific API's and operating system API's. Is this correct?

是的。







Yes.



Quote:

win32 API的类是用C#等语言编写的

Are win32 API's classes in a language such as C#

你是什么意思? Win32 API 函数打包在(几个) DLL s。







What do you mean? Win32 API are functions packaged in (several) DLLs.



引用:

如果APi可以设置为DLL甚至Windows服务是否可以使用操作系统功能?

If an APi can be set up as a DLL or even a Windows Service can they utilise operating system functions?

是的, API 可以在内部使用其他 API s,实际上 API 可以使用任何可用的东西。







Yes, an API can internally use other APIs, in fact an API can use whatever is available.



引用:

API似乎也提供了一个由第三方,但我认为这些仅限于公开和使用第三方应用程序的功能吗?

API's also seemed to be provided with an application provided by a third party but I am correct in assuming these are limited to exposing and using functionality of the third party application?

API 的目的是公开功能。







The very purpose of an API is exposing functionality.



Quote:

我有兴趣学习如何在Windows和Unix \ Linux上创建APi并获胜如果有人能提供任何学习这些资源的资源,那就得到了解决。

I am interested in learning how to create APi's on both Windows and Unix\Linux and wondered if anyone could provide any resouces for learning these.

这并不困难。创建一堆函数(或类等)使它们可用(例如将它们打包在动态或静态库或其他任何内容中)并记录它。困难的任务是提供良好的 API

That's not difficult. Create a bunch of functions (or classes, etc..) make them available (e.g. package them in a dynamic or static library or whatever) and document it. The difficult task is providing a good API.


API只是一组方法,类等等可以帮助您与其他软件(或某些情况下的硬件)连接 - 目标软件可以是像Word或Excel这样的应用程序,像Windows这样的操作系统(或者它的一小部分,你可以获得个性化)用于操作系统中特定功能的API,用于处理Zip文件,或基于Web的服务,如CodeProject和PayPal API。



它们可以提供给任何人目标语言,但通常只是少数,这取决于PAI作者想要支持的内容 - 每个额外的框架都需要为原始开发人员提供更多的工作。



提供和创作一个API不是做这个,你在那里的事情 - 它们都是不同的,因为它们都必须与不同的终端系统进行交互。
An API is just a set of methods, classes, and suchlike which help you to interface to some other software (or hardware in some cases) - the "target" software can be an application like Word or Excel, an operating system like Windows (or a smaller part of it, you get individual API's for specific functions in the OS as well), to handle Zip files, or a web based service like the CodeProject and PayPal API's.

They can be provided for any target language, but are usually only for a small number depending on what the PAI author want's to support - each additional framework takes more work for the original developer.

Providing and authoring an API is not a "do this and you're there" thing - they are all different because they all have to interact with different end systems.


这篇关于关于学习API的指导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆