good guy
good guy

Reputation: 569

iPhone: What does API means

What does API (Application Programming Interface) mean?

Do programmers have to refer API's (Facebook social networking API site), when developing site in other platforms?

I don't know anything about coding, so I would like some examples in addition to a definition, especially with context to iPhone.

Upvotes: 0

Views: 15123

Answers (5)

Mohit Soni
Mohit Soni

Reputation: 61

APIs are just Application Program Interfaces or program sub-routines to provide the programmers with new set of functionalities by means of functions, procedures, methods or classes which may include specifications for routines, data structures, object classes, and variables. Just like a GUI (graphical user interface) makes it easier for people to use programs, application programming interfaces make it easier for developers to use certain technologies in building applications. By abstracting the underlying implementation and only exposing objects or actions the developer needs, an API reduces the cognitive load on a programmer. While a graphical interface for an email client might provide a user with a button that performs all the steps for fetching and highlighting new emails, an API for file input/output might give the developer a function that copies a file from one location to another without requiring that the developer understand the file system operations occurring behind the scenes.

Upvotes: 0

iCrazyDev
iCrazyDev

Reputation: 925

An application programming interface (API) is a specification intended to be used as an interface by software components to communicate with each other. An API may include specifications for routines, data structures, object classes, and variables.

language-dependent, meaning it is only available by using the syntax and elements of a particular language, which makes the API more convenient to use. language-independent, written so that it can be called from several programming languages. This is a desirable feature for a service-oriented API that is not bound to a specific process or system and may be provided as remote procedure calls or web services. For example, a website that allows users to review local restaurants is able to layer their reviews over maps taken from Google Maps, because Google Maps has an API that facilitates this functionality. Google Maps' API controls what information a third-party site can use and how they can use it. The term API may be used to refer to a complete interface, a single function, or even a set of APIs provided by an organization. Thus, the scope of meaning is usually determined by the context of usage.

In object-oriented languages, an API usually includes a description of a set of class definitions, with a set of behaviors associated with those classes. This abstract concept is associated with the real functionality exposed, or made available, by the classes that are implemented in terms of class methods (or more generally by all its public components hence all public methods, but also possibly including any internal entity made public, like fields, constants, nested objects, enums...). The API in this case can be conceived as the totality of all the methods publicly exposed by the classes (usually called the class interface). This means that the API prescribes the methods by which one interacts with/handles the objects derived from the class definitions. More generally, one can see the API as the collection of all the kinds of objects one can derive from the class definitions, and their associated possible behaviors. Again: the use is mediated by the public methods, but in this interpretation, the methods are seen as a technical detail of how the behavior is implemented.

Upvotes: 1

ohho
ohho

Reputation: 51901

API is Application Programming Interface.

iPhone is a machine. Programmers are human beings.

When programmers want to do some stuff on the iPhone. We usually call that some stuff a program or an application. An application can be a game like chess, can be an alarm clock, can post photos to Facebook ...

The activity of how programmers tell iPhone to do stuff is usually called programming. Programmers and iPhone communicate in some common languages. The popular language between iPhone and programmers is Objective-C.

Now we know what is "application" and "programming" in "application programming interface". Then, what is "interface"?

iPhone can do many things, but not all things. iPhone tell the world what kind of stuff it can do by some public announcement. For example, announcements like iPhone can show text, iPhone can show photos, iPhone can make a call ... the announcements are the interface.

Facebook is another machine. It can do other stuff. When a programmer wants to do some stuff which involves the two machines (e.g. send a photo from iPhone album and post on Facebook wall), the programmer has to know the API of both iPhone and Facebook to make new things happen.

Upvotes: 8

Matchu
Matchu

Reputation: 85784

An API is a system designed by programmers for programmers.

Here's the definition from the Simple English Wikipedia:

An Application Programming Interface (API) is a set of functions, procedures, methods or classes used by computer programs to request services from the operating system, software libraries or any other service providers running on the computer. A computer programmer uses the words in the API to make application programs. Types of API include web services API like the Twitter API, which allows programs to use the API to receive updates on tweets.

APIs can have to do with websites, like the Twitter example, in which programmers use the Twitter API to interact with Twitter, like finding tweets by a certain user or tweeting on a user's behalf. The Facebook API works similarly: it a system that Facebook created that I can use to access certain data on Facebook.

APIs can also be used to interact with systems in general. In the case of the iPhone, there is the language of Objective-C, and the iPhone API is a set of Objective-C methods built by Apple that allow a developer's app to interact with the iPhone. For example, the iPhone API includes methods for responding to fingers on the touch screen, and methods for drawing to the screen.

Upvotes: 17

Robert
Robert

Reputation: 6540

An API, or "application programming interface" as you noted, is an interface to program applications. I don't quite understand what you're asking. It's some strictly-defined way of using services provided by other code.

Upvotes: 1

Related Questions