What exactly is the meaning of an API? [closed]
Solution 1:
Searches should include Wikipedia, which is surprisingly good for a number of programming concepts/terms such as Application Programming Interface:
What is an API?
An application programming interface (API) is a particular set of rules ('code') and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.
How is it used?
The same way any set of rules are used.
When and where is it used?
Depends upon realm and API, naturally. Consider these:
- The x86 (IA-32) Instruction Set (very useful ;-)
- A BIOS interrupt call
- OpenGL which is often exposed as a C library
- Core Windows system calls: WinAPI
- The Classes and Methods in Ruby's core library
- The Document Object Model exposed by browsers to JavaScript
- Web services, such as those provided by Facebook's Graph API
- An implementation of a protocol such as JNI in Java
Happy coding.
Solution 2:
An API is the interface through which you access someone elses code or through which someone else's code accesses yours. In effect the public methods and properties.