Application Programming Interface

From Scriptionary.com

Jump to: navigation, search

An Application Programming Interface, commonly called API, provides an interface to specific computer functionality. APIs are usually provided by the developers of Operating Systems and Computer Programs to allow third-party software developers to utilize the library in their own programs.

An API only describes the functionality of a library and doesn't implement it. This process is called abstraction and is often used to secure the library's source code from the public eye.

For example, the API can describe the following information:

bool CallFunction(int ParamOne, int ParamTwo);

While the actual source code might look like:

// These functions do the actual work:
bool hParmOne(int P1) { /* do something */ };
bool hParmTwo(int P2) { /* do something */ };
 
// The implementation for the API call:
bool CallFunction(int P1, int P2)
{
return bool ( hParmOne(P1) && hParmTwo(P2) );
};

Examples of some APIs used on this website are: Direct3D, OpenGL and the Windows API.

Personal tools