An application programmer interface contains the definitions of how a particular computing resource is used by programmers. It contains a set of protocols, tools and routines which can be used by programmers to build software applications for a particular platform or set of platforms. It contains all the building blocks and libraries needed to develop, all the programmer does is to put the blocks together and make reference to the libraries.
An API abstracts the interface for interaction with the software system. An implementation of the API provides functions defined in the API. APIs are developed to solve particular problems and may language dependent. An API written in the C programming language for instance can only be used to develop applications in the same language. Recently however, there has been APIs that are language independent and can be called from a wide rang of languages.
Most operating systems provide their own APIs that allow programmers to develop applications for such system platforms. Most operating systems have different APIs for database systems, file systems, windowing and networking systems. Sockets and TLI define access to TCP and UDP layers of communication. They therefore provide programmers with the tools to develop applications that apply to these layers. Windows operating systems has a socket API that allows programmers to develop socket based applications on the Windows system. It may also be used to develop network based sub-routines.
The performance of a task may also be defined by the API. It defines what to expect from a library and how it can be used. The math.h C programming library in Linux for instance defines how math functions included in the library are to be used and the results to deliver. Saying for instance sqrt(X), will produce the square root of a value X. Any other way of trying to implementing this will not work since that is not how it is defined. Another example is the API in the object oriented systems, which define how classes and objects are defined and implemented, how methods are implemented by the classes and so on.
APIs can also be implemented over the internet, called web APIs. These are generally used to develop web applications. Web APIs define the Hypertext Transfer Protocol request messages as well as the the structure and form of the response messages which may be in java script , Object Notation or Extensible Markup Language. The recently released web API is the Web 2.0.
APIs are also used to share content on the internet. Content created using such APIs can be shared on any location on the internet that implements the same API. Social networking sites have found particular use of these web APIs. Photos and videos can be shared from MySpace, Flicker and Photobucket can be shared on facebook. Presentations and document . from Slideshare may be shared on LinkedIn, Twitter comments on Facebook and many more examples.
Although the APIs were developed with the programmer in mind, the ordinary user can also take advantage of them. An API may help a user understand how programs with similar interfaces work, aiding the user to learn to use such programs easily.
About Author / Additional Info: