MadSci Network: Computer Science
Query:

Re: What exactly is an API?

Date: Mon Nov 20 18:58:46 2000
Posted By: David Ehnebuske, Sr. Technical Staff Member, Software, IBM Corporation
Area of science: Computer Science
ID: 973262011.Cs
Message:

Jonathan,

You asked what the term "API" (a.k.a. "Application Programming Interface") means in the real world. Here's my shot at the answer.

Generally, an API is a well-defined entry way, deliberately built into a piece of software. Its intent is to provide other programmers the capability to use the piece of software with the API from other pieces of software. Usually APIs are documented, published to their intended audiences, and held constant across releases of the software that contains them. The key points here are that APIs are well defined and intended for use by other programmers.

As defined above, "application programming interface" is very broad. Sometimes, but certainly not always, people intend "API" to imply certain other distinctions. Here are a few of the most common.

Sometimes people distinguish "application programming interfaces" from "system programming interfaces" (SPI's). In this case, the distinction lies in who the target audience is. For API's the audience is people who write or customize applications -- those piece of software that make computers do what their owners bought them to do -- as opposed to people who write "system" code -- the support code, such as operating systems, communications software, databases, etc. -- that make it easier to write applications.

At other times, the term "API" is used to emphasize programming interfaces that are intended for use by other programmers from technically similar interfaces that are not. Since software is always built in some sort of modular fashion, there are always programming interfaces between the parts, most of which are intended for use only by the people who built the software. Such interfaces are often called the software's "internal programming interfaces" and contrasted with its API's. Commonly, internal interfaces can, in a technical sense, be used in exactly the same way as API's. But the software's designers will tell you, "Don't use internal interfaces". Using an internal interface might have unintended consequences, it could well change or disappear in the next version, and using it might violate the software's license.

An API is traditionally provided as a simple call-and-return mechanism using some programming language's subroutine, procedure, function, or method invocation mechanism. When this is emphasized  in discussing an API, the speaker is probably making the distinction between this kind of interface and one that is not local or one that uses some mechanism other than call-and-return. For example, an interface to function that's provided over the network or that uses asynchronous messaging.

I hope this helps. If you need more, please e-mail me.


Current Queue | Current Queue for Computer Science | Computer Science archives

Try the links in the MadSci Library for more information on Computer Science.



MadSci Home | Information | Search | Random Knowledge Generator | MadSci Archives | Mad Library | MAD Labs | MAD FAQs | Ask a ? | Join Us! | Help Support MadSci


MadSci Network, webadmin@www.madsci.org
© 1995-2000. All rights reserved.