1

I'm writing some pedagogic material and when I started explaining what an API is I realized I didn't know why we say "application programming interface" instead of just "programming interface". Does anyone know the history?

  • Because API are used by applications I would say :). So your programming interface is made to be used by an application. Unlike some graphic component that are made to be used by a user, so we call it user interface. – Walfrat Sep 13 '17 at 14:31
  • 2
    I suspect the origins of the term, and thus why it was chosen, are lost to the mists of time. I very much suspect though that the reason is a practical one: PI is 3.1415... so calling a programming interface, PI, would be confusing. As the term refers to programming interfaces for creating or extending applications, it got called API. – David Arno Sep 13 '17 at 14:34
  • @Walfrat APIs are also used by libraries. – Stop harming Monica Sep 13 '17 at 15:16
  • 1
    @Goyo which are used by applications. – Walfrat Sep 13 '17 at 16:03
  • 1
    Application programming used to be sharply distinguished from systems programming. An application programmer was not supposed to understand or be interested in the internal data structures of the OS, so you'd create a Facade for them to use - the API. – Kilian Foth Sep 14 '17 at 6:46
1

The reason why is because an API more often than not isn't a general machine-code type interface, but is an interface to a software module that performs a particular function, i.e. a particular application.

Libraries to perform image processing, to compress files, to schedule dentist appointments, to auto-tune signers, are all modules that provide an application of software to solve a particular problem. Much of the API choices going into auto-tune are different than for scheduling dentist appointments, and the data structures and manipulation processes are different.

If you just said "programming interface", myself and I suspect many others would think of a very low-level function of e.g. loading executable code from disk into memory, loading code onto a flash chip, etc.

A "programming interface" would be something compiler writers and chip designers would be concerned about, whereas an "application programming interface" is a higher up level of abstraction.

  • 2
    What you call a low-level “programming interface” might be more well-known as an “application binary interface (ABI)”: things like memory layout, calling conventions, syscalls. In this era of managed languages most people don't have to bother with ABIs, but it's something to be aware of when writing C/C++. – amon Sep 13 '17 at 14:43
0

Sometimes a distinction between application software and systems software is drawn. Application software is software to address specific problems or to interact with users. In contrast, system software provides services to other software. Operating systems and software libraries are examples of systems software.

The application programming interface is the interface exposed by systems software through which it provides services for application software.

Nowadays, distinction between applications and systems software is almost entirely useless and unclear. Many programs are both application-like and platform-like (e.g. a web browser not only offers a user interface for the web, but also a runtime environment for web applications). Additionally, multiple layers of system-like software are often layered on top of each other, which must also communicate through some interface

Therefore, the term “application programming interface” effectively refers to any software–software interface.

  • 1
    I would expect something less hand-wavy in an answer to question tagged history – gnat Sep 13 '17 at 15:17
  • In most other engineering disciplines "application", as used by products manufacturers, refers to "whatever you do with the product". In this context "application" should be seen as your goal with the product - the API being the set of commands the manufacturer gives you to accomplish this. You first draw an arbitrary border between systems vs. application software and then say it's no longer relevant. Somehow, this doesn't sound right. – user44761 Sep 13 '17 at 21:59
  • @Tibo I didn't draw an “arbitrary border”. The applicationssystems difference is widely recognized, though it seems to be more of a mainframe-era concept where hardware and systems software were provided by the same vendor. Most current-day programmers no longer feel a clear difference, possibly due to increased modularization ushered in during the 90s OOP hype. – amon Sep 13 '17 at 22:13
  • I'm not denying the existence of application-systems distinction in general. I'm trying (awkwardly I admit) to point that you're not starting from the appropriate definition of "application". Imho the 2nd definition of this list seems more appropriate than the 5th. If we use this definition the applications-system distinction becomes much less relevant. All can have an API, which is merely a set of tools/instructions (interface) the manufacturer (library writer) hands you to get your task done. But I wouldn't bet my life on it :) – user44761 Sep 13 '17 at 22:38
0

The "application" refers to software programming; as opposed to programming for a hardware interface (such as a device driver) or a human interface (such as a mouse).

From SmartyStreets:

APIs allow one program, or part of a program, to interface with another.

Similarly, from Wikipedia:

In general terms, it is a set of clearly defined methods of communication between various software components.

API Evangelist defines an API as:

The principal of a well documented set of publicly addressable "entry points" that allow an application to interact with another system....

0
  • api (application programming interface) is for applications that want to use a lib
  • spi (service provider interface) is a kind of "os-device driver" or plugin or protocol or callback-function that you must implement to allow the (operating-) system to use your code.

the program flow is like this

yourApp -> api -> os -> spi -> device driver

Examples

  • your app uses the file-api to read/write a config file. there are different spi implementations for filesystems cdrom, vfat, ntfs, .....
  • firefox-webbrowser -> spi -> firefox-plugin ( -> api -> ... )
  • in java/c/c++/c# the function main() is the spi that you have to implement when you want to write a console applicatoin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy