All Topics  
Application programming interface

 

   Email Print
   Bookmark   Link






 

Application programming interface



 
 
An application programming interface (API) is a set of routines
Subroutine

In computer science, a subroutine or subprogram is a portion of computer code within a larger computer program, which performs a specific task and is relatively independent of the remaining code....
, data structure
Data structure

A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data....
s, object classes
Class (computer science)

In object-oriented programming, a class is a programming language construct that is used as a blueprint to create Object s. This blueprint includes Attribute s and Method s that the created objects all share....
 and/or protocols
Protocol (computing)

In computer science, a protocol is a convention or standard that controls or enables the connection, communication, and data transfer between computing endpoints....
 provided by libraries
Library (computer science)

In computer science, a library is a collection of subroutines or Class used to develop software. Libraries contain code and data that provide services to independent programs....
 and/or operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
  services in order to support the building of applications. An API may be:





The API itself is largely abstract
Abstraction (computer science)

In computer science, abstraction is a mechanism and practice to reduce and factor out details so that one can focus on a few concepts at a time....
 in that it specifies an interface and controls the behavior of the objects specified in that interface. The software that provides the functionality described by an API is said to be an implementation of the API.






Discussion
Ask a question about 'Application programming interface'
Start a new discussion about 'Application programming interface'
Answer questions from other users
Full Discussion Forum



Encyclopedia


An application programming interface (API) is a set of routines
Subroutine

In computer science, a subroutine or subprogram is a portion of computer code within a larger computer program, which performs a specific task and is relatively independent of the remaining code....
, data structure
Data structure

A data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data....
s, object classes
Class (computer science)

In object-oriented programming, a class is a programming language construct that is used as a blueprint to create Object s. This blueprint includes Attribute s and Method s that the created objects all share....
 and/or protocols
Protocol (computing)

In computer science, a protocol is a convention or standard that controls or enables the connection, communication, and data transfer between computing endpoints....
 provided by libraries
Library (computer science)

In computer science, a library is a collection of subroutines or Class used to develop software. Libraries contain code and data that provide services to independent programs....
 and/or operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
  services in order to support the building of applications. An API may be:

  • Language-dependent; that is, available only in a particular programming language, using the particular syntax and elements of the programming language to make the API convenient to use in this particular context.


  • Language-independent; that is, written in a way that means it can be called from several programming languages (typically an assembly
    Assembly language

    An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
    /C-level interface). This is a desired feature for a service-style API that is not bound to a particular process or system and is available as a remote procedure call
    Remote procedure call

    Remote procedure call is an Inter-process communication technology that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction....
    .


The API itself is largely abstract
Abstraction (computer science)

In computer science, abstraction is a mechanism and practice to reduce and factor out details so that one can focus on a few concepts at a time....
 in that it specifies an interface and controls the behavior of the objects specified in that interface. The software that provides the functionality described by an API is said to be an implementation of the API. An API is typically defined in terms of the programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 used to build an application. The related term, ABI
Application binary interface

In computer software, an application binary interface describes the low-level interface between an application program and the operating system or an other application....
 (Application Binary Interface), is a lower level definition concerning details at the Assembly language
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
 level. For example, the Linux Standard Base
Linux Standard Base

The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure used with the Linux operating system....
 is an ABI
Application binary interface

In computer software, an application binary interface describes the low-level interface between an application program and the operating system or an other application....
, while POSIX
POSIX

POSIX or "Portable Operating System Interface" is the collective name of a family of related standardizations specified by the Institute of Electrical and Electronics Engineers to define the application programming interface , along with shell and utilities interfaces for software compatible with variants of the Unix operating system, altho...
 is an API.

The API acronym may sometimes be used as a reference not only to the full interface but also to a single function or even a set of multiple APIs provided by an organization. Thus the scope is usually determined by the person or document that communicates the information.

Implementations

The POSIX
POSIX

POSIX or "Portable Operating System Interface" is the collective name of a family of related standardizations specified by the Institute of Electrical and Electronics Engineers to define the application programming interface , along with shell and utilities interfaces for software compatible with variants of the Unix operating system, altho...
 standard defines an API that allows a wide range of common computing functions to be written such that they may operate on many different systems (Mac OS X
Mac OS X

Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
 and various BSDs
Berkeley Software Distribution

Berkeley Software Distribution is the Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995....
 implement this interface); however, making use of this requires re-compilation
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
 for each platform. A compatible ABI, on the other hand, allows compiled object code to function without any changes, on any system implementing that ABI. This is advantageous to both software providers (where they may distribute existing software on new systems without producing/distributing upgrades) and users (where they may install older software on their new systems without purchasing upgrades), although this generally requires various software libraries implementing the necessary APIs too.

Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 has shown significant commitment to a backward compatible ABI, particularly within their Win32 library, such that older applications may run on newer versions of Windows. Apple Inc. has shown less propensity to this concern, expiring compatibility or implementing ABI in a slower "emulation mode"; this allows greater freedom in development at the cost of obsoleting older software. Among Unix-like
Unix-like

A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
 operating systems, there are many related but incompatible operating systems running on a common hardware platform (particularly Intel 80386
Intel 80386

The Intel 80386, otherwise known as the i386 or just 386, is a microprocessor which has been used as the central processing unit of many personal computers and workstations since 1986....
-compatible systems). There have been several attempts to standardise the ABI such that software vendors may distribute one binary application for all these systems; however to date, none of these have met with much success. The Linux Standard Base
Linux Standard Base

The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation to standardize the software system structure used with the Linux operating system....
 is attempting to do this for the Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 platform whilst many of the BSD unices (OpenBSD
OpenBSD

OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley....
/NetBSD
NetBSD

NetBSD is a freely redistributable, open source version of the Unix-derivative Berkeley Software Distribution computer operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed....
/FreeBSD
FreeBSD

FreeBSD is a Unix-like free software operating system descended from AT&T Unix via the Berkeley Software Distribution branch through the 386BSD and Berkeley Software Distribution#4.4BSD and descendants operating systems....
) implement various levels of ABI compatibility for both backward compatibility (allowing applications written for older versions to run on newer distributions of the system) and cross-platform compatibility (allowing the execution of foreign code without recompilation).

Release policies


There are several kinds of API publishing policies often encountered, including the following:

  1. Companies do not release API information to anybody outside of the company.
  2. Companies protect information on their APIs from the general public. For example, Sony
    Sony

    is a multinational corporation list of conglomerates corporation headquartered in Minato, Tokyo, Japan, and one of the world's largest media conglomerates with revenue exceeding US$99.1 billion ....
     used to make its official PlayStation 2
    PlayStation 2

    The PlayStation 2 is a History of video game consoles video game console manufactured by Sony. The successor to the PlayStation, and the predecessor to the PlayStation 3, the PlayStation 2 forms part of the PlayStation of video game consoles....
     API available only to licensed PlayStation developers. This enabled Sony to control who wrote PlayStation 2 game
    Game

    A game is a structured wiktionary:activity, usually undertaken for enjoyment and sometimes used as an educational tool. Games are distinct from Manual labour, which is usually carried out for wiktionary:remuneration, and from art, which is more concerned with the expression of ideas....
    s. Such control can have quality control benefits and potential license revenue.
  3. Companies make their APIs freely available. For example, Microsoft
    Microsoft

    Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
     makes the Microsoft Windows
    Microsoft Windows

    Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
     API public and Apple releases its APIs Carbon and Cocoa
    Cocoa (API)

    Cocoa is one of Apple Inc.'s native object-oriented application program environment for the Mac OS X operating system. It is one of four major Application programming interfaces available for Mac OS X; the others are Carbon , POSIX , and Java platform....
     so that software can be written for their platform.


API examples


Below are listed some well-known APIs.

Language bindings and interface generators


Below are listed some interface generator tools.

  • SWIG
    SWIG

    SWIG is an open source software tool used to connect computer program or library written in C /C++ with scripting languages such as Tcl, Perl, Python , Ruby programming language, PHP, Lua , R_language and other languages like Java , C Sharp programming language, Scheme and Ocaml....
     generates interfaces from various languages for Python
  • : Fortran to Python
    Python (programming language)

    Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
     interface generator.


See also

  • Application Binary Interface
    Application binary interface

    In computer software, an application binary interface describes the low-level interface between an application program and the operating system or an other application....
     (ABI)
  • Document Object Model
    Document Object Model

    The Document Object Model is a platform- and programming language-independent standard object model for representing HTML or XML documents as well as an Application Programming Interface for querying, traversing and manipulating such documents....
     (DOM)
  • Mashup (web application hybrid)
    Mashup (web application hybrid)

    In web development, a mashup is a Web application that combines data from one or more sources into a single integrated tool. The term Mashup implies easy, fast integration, frequently done by access to open APIs and data sources to produce results that were not the original reason for producing the raw source data....
  • Open Service Interface Definitions
    Open Service Interface Definitions

    Open Service Interface Definitions are programmatic interface specifications describing services. These interfaces are specified by the Open Knowledge Initiative to implement a Service-Oriented Architecture to achieve interoperability among applications across a varied base of underlying and changing technologies....
     (OSID)
  • Plugin
    Plugin

    In computing, a plug-in consists of a computer program that interacts with a host application software to provide a certain, usually very specific, function "on demand"....
  • Software Development Kit
    Software development kit

    A software development kit is typically a set of development tools that allows a software engineer to create application software for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform....
     (SDK)
  • Web service
    Web service

    A Web service is defined by the W3C as "a software system designed to support interoperability Machine to Machine interaction over a computer network"....
  • List of 3D graphics APIs
    List of 3D graphics APIs

    3D graphics have become so popular, particularly in computer games, that specialized APIs have been created to ease the processes in all stages of computer graphics generation....
  • API Writers
    API Writer

    An API Writer is an individual involved in writing documents related to Application Programming Interface targeted towards developers, system architects and designers....


External links

  • book and collaboration site