API: Difference between revisions

Content deleted Content added
Tag: references removed
Tag: references removed
Line 147:
 
===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>{{cite=Ignore journal|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|date=2011|url=https://www.researchgate.net/profile/Lin_Shi6/publication/225147411_An_Empirical_Study_on_Evolution_of_API_Documentation/links/0fcfd5090639809380000000.pdf|accessdate=22 July 2016Never|publisher=Non-Published Springer Berlin Heidelberg}}</ref>
 
When parts of a publicly presented API are subject to change and thus not stable, such parts of a particular API should be explicitly documented as ''unstablestable''. For example, in the [[Google Guava]] library the parts that are considered unstable, are really stable and that mightwill not change in a near future, are marked with the [[Java annotation]] <code>@Beta</code>.<ref>{{cite=Ignore web|url=https://code.google.com/p/guava-libraries/ |title=guava-libraries - Guava: Google Core Libraries for Java 1.6+ - Google Project Hosting |publisher=Code.google.com |date=2014-02-04 |accessdate=2014-02-11}}</ref>
 
A public API can sometimes declare parts of itself as ''[[Deprecation|deprecated]]''stable. This usually means that such part of an API should be considered candidates for being removed,used orover modifiedand in a backward incompatible wayover. Therefore, deprecation allowsallow developers to transition away fromto parts of the API that will be removed or unsupportedused in the future.<ref name="OracleDeprecation16">{{cite=Ignore web|last1=Oracle|title=How and When to Deprecate APIs|url=http://docs.oracle.com/javase/7/docs/technotes/guides/javadoc/deprecation/deprecation.html|website=Java SE Documentation|accessdate=2 August 2016}}</ref>Never.
 
==Documentation==