Content deleted Content added
Reverted 1 good faith edit by 2405:204:E28C:8EE6:0:0:1630:18A5 using STiki unexplained change of content |
Fix cite date error |
||
Line 10:
Just as a [[graphical user interface]] (GUI) makes it easier for people to use programs, application programming interfaces make it easier for developers to use certain technologies in building applications. An API simplifies programming by [[Abstraction (software engineering)|abstracting]] the underlying implementation and only exposing objects or actions the developer needs. 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 [[Subroutine|function]] that copies a file from one ___location to another without requiring that the developer understand the [[Journaling file system|file system]] operations occurring behind the scenes.<ref name="Clarke4">{{cite web|last1=Clarke|first1=Steven|title=Measuring API Usability|url=http://www.drdobbs.com/windows/measuring-api-usability/184405654|website=Dr. Dobb's|accessdate=29 July 2016|date=2004}}</ref>
The modern API management helps the enterprises expose individual components in well-documented services that the internal developers and partners can use to rapidly iterate new features.<ref>{{Cite news|url=https://www.forbes.com/sites/forbestechcouncil/2017/05/08/apis-leverage-for-digital-transformation/|title=APIs: Leverage For Digital Transformation|last=Rethans|first=John|work=Forbes|access-date=2018-10-11
== History ==
Line 27:
An API for a [[procedural programming|procedural language]] such as [[Lua (programming language)|Lua]] could consist primarily of basic routines to execute code, manipulate data or handle errors while an API for an [[object-oriented programming|object-oriented language]], such as Java, would provide a specification of classes and its [[class method]]s.<ref>{{cite journal|last1=de Figueiredo|first1=Luiz Henrique|last2=Ierusalimschy|first2=Roberto|last3=Filho|first3=Waldemar Celes|title=The design and implementation of a language for extending applications|journal=TeCGraf Grupo de Tecnologia Em Computacao Grafica|url=https://www.researchgate.net/publication/2778436|accessdate=29 July 2016}}</ref><ref name="Sintes16">{{cite web|last1=Sintes|first1=Tony|title=Just what is the Java API anyway?|url=http://www.javaworld.com/article/2077392/java-se/just-what-is-the-java-api-anyway.html|website=JavaWorld|accessdate=29 July 2016|date=2001-07-13}}</ref>
[[Language binding]]s are also APIs. By mapping the features and capabilities of one language to an interface implemented in another language, a language binding allows a library or service written in one language to be used when developing in another language.<ref name=Emery>{{cite web|url=http://www.acm.org/tsc/apis.html|last1=Emery|first1=David|title=Standards, APIs, Interfaces and Bindings|publisher=Acm.org|date=|accessdate=2016-08-08|archive-url=https://web.archive.org/web/20150116081559/http://www.acm.org/tsc/apis.html|archive-date=2015-01-16|dead-url=yes
An API can also be related to a [[Framework (computer science)|software framework]]: a framework can be based on several libraries implementing several APIs, but unlike the normal use of an API, the access to the behavior built into the framework is mediated by extending its content with new classes plugged into the framework itself.
Line 130:
| first = Josh
| title = How to design a good API and why it matters
| url = http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/32713.pdf}}</ref> Kin Lane,<ref>{{Cite web|url=http://pages.3scale.net/rs/516-GHI-083/images/api-provider-guide-api-design.pdf|title=The Industry Guide to API Design|last=Lane|first=Kin|date=2016-03-14|website=|publisher=Kin Lane via 3scale|access-date=2016-03-14|archive-url=https://web.archive.org/web/20160315040538/http://pages.3scale.net/rs/516-GHI-083/images/api-provider-guide-api-design.pdf|archive-date=2016-03-15|dead-url=yes
| last = Henning
| first = Michi
Line 153:
===Public API implications===
An important factor when an API becomes public is its "interface stability". Changes by a developer to a part of it—for example adding new parameters to a function call—could break compatibility with clients that depend on that API.<ref name="researchgate.net">{{cite book|last1=Shi|first1=Lin|last2=Zhong|first2=Hao|last3=Xie|first3=Tao|last4=Li|first4=Mingshu|title=An Empirical Study on Evolution of API Documentation|journal=International Conference on Fundamental Approaches to Software Engineering|volume=6603|pages=416–431|date=2011|url=https://www.researchgate.net/publication/225147411|accessdate=22 July 2016|doi=10.1007/978-3-642-19811-3_29|series=Lecture Notes in Computer Science|isbn=978-3-642-19810-6}}</ref>
When parts of a publicly presented API are subject to change and thus not stable, such parts of a particular API should be documented explicitly as "unstable". For example, in the [[Google Guava]] library, the parts that are considered unstable, and that might change in the near future, are marked with the [[Java annotation]] <code>@Beta</code>.<ref>{{cite web|url=https://code.google.com/p/guava-libraries/ |title=guava-libraries - Guava: Google Core Libraries for Java 1.6+ - Google Project Hosting |date=2014-02-04 |accessdate=2014-02-11}}</ref>
Line 173:
Restrictions and limitations on how the API can be used are also covered by the documentation. For instance, documentation for an API function could note that its parameters cannot be null, that the function itself is not [[Thread safety|thread safe]],<ref name="MonperrusEichberg11">{{cite journal|last1=Monperrus|first1=Martin|last2=Eichberg|first2=Michael|last3=Tekes|first3=Elif|last4=Mezini|first4=Mira|title=What should developers be aware of? An empirical study on the directives of API documentation|journal=Empirical Software Engineering|date=3 December 2011|volume=17|issue=6|pages=703–737|doi=10.1007/s10664-011-9186-4|arxiv=1205.6363}}</ref> or that a [[Increment and decrement operators|decrement]] and cancel protocol averts self-trading.{{Clarify|reason=explanation required|date=February 2018}}
Because API documentation tends to be comprehensive, it is a challenge for writers to keep the documentation updated and for users to read it carefully, potentially yielding [[Software bug|bugs]].<ref
API documentation can be enriched with [[metadata]] information like [[Java annotation]]s. This metadata can be used by the compiler, tools, and by the ''run-time'' environment to implement custom behaviors or custom handling.<ref>{{cite web|url = http://download.oracle.com/javase/1,5.0/docs/guide/language/annotations.html|title = Annotations|accessdate = 2011-09-30|publisher = [[Sun Microsystems]]}}.</ref>
Line 192:
In 2014, however, Alsup's ruling was overturned on appeal, though the question of whether such use of APIs constitutes [[fair use]] was left unresolved.<ref>{{cite news | url=http://www.cnet.com/news/court-sides-with-oracle-over-android-in-java-patent-appeal/ | title=Court sides with Oracle over Android in Java patent appeal | work=CNET | date=May 9, 2014 | accessdate=2014-05-10 | author=Rosenblatt, Seth}}</ref>
In 2016, following a two-week trial, a jury determined that Google's reimplementation of the Java API constituted fair use, but Oracle vowed to appeal the decision.<ref>{{Cite web|url=https://arstechnica.com/tech-policy/2016/05/google-wins-trial-against-oracle-as-jury-finds-android-is-fair-use/|title=Google beats Oracle—Android makes "fair use" of Java APIs|website=Ars Technica|access-date=2016-07-28|date=2016-
== Examples ==
|