Content deleted Content added
Unnecessary words (in QCon talk by "Joshua Bloch") |
windows Tags: references removed Visual edit Mobile edit Mobile web edit |
||
Line 1:
{{redirect|API}}
In [[
An API may be for a web-based system, [[operating system]], [[database system]], computer hardware, or [[Library (computing)|software library]].
An API specification can take many forms, but often includes specifications for [[subroutine|routines]], [[data structure]]s, [[Class (computer programming)|object classes]], [[variable (computer science)|variable]]s, or [[Remote procedure call|remote calls]]. [[POSIX]], [[Windows API]] and [[Advanced SCSI programming interface|ASPI]] are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage and implementation.
== Purpose ==
Just as a
By
== Uses ==
===Libraries and frameworks===
An API is usually related to a
A single API can have multiple implementations (or none, being abstract) in the form of different libraries that share the same programming interface.
The separation of the API from its implementation can allow programs written in one language to use a library written in another.
For example, because
API use can vary depending on the type of programming language involved.
An API for a
An API can also be related to a
Moreover, the overall program flow of control can be out of the control of the caller and in the hands of the framework by
===Operating systems===
An API can specify the interface between an application and the
{{cite web
|author=Microsogt
Line 87 ⟶ 75:
{{Main article|Web API}}
Web APIs are the defined interfaces through which interactions happen between an enterprise and applications that use its assets, which also is a Service Level Agreement (SLA) to specify the functional provider and expose the service path or URL for its API users, An API approach is an architectural approach that revolves around providing a program interface to a set of services to different applications serving different types of consumers.<ref>{{cite web |url=http://www.hcltech.com/sites/default/files/apis_for_dsi.pdf |website=www.hcltech.com |format=PDF download |title=API-fication |date=August 2014}}</ref>
When used in the context of [[web development]], an API is typically defined a set of specifications , such as [[Hypertext Transfer Protocol]] (HTTP) request messages, along with a definition of the structure of response messages, which is usually in an Extensible Markup Language (
{{cite web
|first = Djamal
Line 114 ⟶ 102:
==Design==
The design of an API has significant impact on its usage.<ref name="Clarke4">{{cite web|url=http://www.drdobbs.com/windows/measuring-api-usability/184405654|title=Measuring API Usability|last1=Clarke|first1=Steven|date=2004|website=Dr. Dobb's|accessdate=29 July 2016}}</ref> The principle of [[information hiding]] describes the role of programming interfaces as enabling [[modular programming]] by hiding the implementation details of the modules so that users of modules need not understand the complexities inside the modules.<ref name="Parnas72">{{cite journal|last1=Parnas|first1=D.L.|title=On the Criteria To Be Used in Decomposing Systems into Modules|journal=Association for Computing Machinery|date=1972|url=http://www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf|accessdate=8 August 2016}}</ref> Thus, the design of an API attempts to provide only the tools a user would expect.<ref name="Clarke4"/> The design of programming interfaces represents an important part of [[software architecture]], the organization of a complex piece of software.<ref name="GarlanShaw94">{{cite journal|last1=Garlan|first1=David|last2=Shaw|first2=Mary|title=An Introduction to Software Architecture|journal=Advances in Software Engineering and Knowledge Engineering|date=January 1994|volume=1|url=http://www.cs.cmu.edu/afs/cs/project/able/ftp/intro_softarch/intro_softarch.pdf|accessdate=8 August 2016}}</ref>
Several authors have created recommendations for how to design APIs, such as [[Joshua Bloch]],<ref>{{cite web
|