Example
APIs are similar to user interfaces but for code. For example, a user interface might let a customer pay a bill by providing their authentication details, entering an amount, selecting a bill and pushing a few buttons. An API could be constructed with the same functionality. The API might require authentication and then allow a bill to be paid by providing data such as an amount and a billing account number.Complexity Hiding
APIs allow complexity to be hidden so that coders don't need to understand every little detail of a program. If a coder needs to encrypt some data, they probably don't want to deal with the complexity of encryption algorithms. As such, an encryption API may provide a service that allows a programmer to encrypt something by passing in parameters such as a key and data to be encrypted.Overview: API | ||
Type | ||
Definition | A service that code offers via a well defined contract that specifies parameters and results. | |
Value | Hiding the complexity of code behind an easy to use interface. | |
Also Known As | Application programming interface | |
Related Concepts |