/usr/share/help/de/programming-guidelines/api-stability.page is in gnome-devel-docs 3.28.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | <?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="api-stability" xml:lang="de">
<info>
<link type="guide" xref="index#maintainer-guidelines"/>
<credit type="author copyright">
<name>Philip Withnall</name>
<email its:translate="no">philip.withnall@collabora.co.uk</email>
<years>2015</years>
</credit>
<include xmlns="http://www.w3.org/2001/XInclude" href="cc-by-sa-3-0.xml"/>
<desc>Abwärtskompatibilität in APIs</desc>
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
<mal:name>Mario Blättermann</mal:name>
<mal:email>mario.blaettermann@gmail.com</mal:email>
<mal:years>2016</mal:years>
</mal:credit>
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
<mal:name>Christian Kirbach</mal:name>
<mal:email>christian.kirbach@gmail.com</mal:email>
<mal:years>2016</mal:years>
</mal:credit>
</info>
<title>API-Stabilität</title>
<synopsis>
<title>Zusammenfassung</title>
<list>
<item><p>Definieren Sie API-Stabilitätsgarantien für Ihr Projekt. (<link xref="#stability"/>)</p></item>
<item><p>Stellen Sie sicher, dass Versionsnummern entsprechend den API-Änderungen Ihres Projekts ebenfalls geändert werden. (<link xref="#versioning"/>)</p></item>
</list>
</synopsis>
<section id="api-and-abi">
<title>API und ABI</title>
<p>
At a high level, an API – <em>Application Programming Interface</em> – is
the boundary between two components when developing against them. It is
closely related to an ABI – <em>Application Binary Interface</em> – which
is the boundary at runtime. It defines the possible ways in which other
components can interact with a component. More concretely, this normally
means the C headers of a library form its API, and compiled library
symbols its ABI. The difference between an API and ABI is given by
compilation of the code: there are certain things in a C header, such as
<code>#define</code>s, which can cause a library’s API to change without
changing its ABI. But these differences are mostly academic, and for all
practical purposes, API and ABI can be treated interchangeably.
</p>
<p>Beispiele für API-kompatiblen Änderungen einer C-Funktion wären das Hinzufügen eines neuen Parameters, Ändern des Rückgabetyps einer Funktion oder die Entfernung eines Parameters.</p>
<p>
However, many other parts of a project can form an API. If a daemon
exposes itself on D-Bus, the interfaces exported there form an API.
Similarly, if a C API is exposed in higher level languages by use of
GIR, the GIR file forms another API — if it changes, any higher level
code using it must also change.
</p>
<p>
Other examples of more unusual APIs are configuration file locations and
formats, and GSettings schemas. Any changes to these could require code
using your library to change.
</p>
</section>
<section id="stability">
<title>Stabilität</title>
<p>
API stability refers to some level of guarantee from a project that its
API will only change in defined ways in the future, or will not change at
all. Generally, an API is considered ‘stable’ if it commits to
backwards-compatibility (defined below); but APIs could also commit to
being unstable or even forwards-compatible. The purpose of API stability
guarantees is to allow people to use your project from their own code
without worrying about constantly updating their code to keep up with
API changes. Typical API stability guarantees mean that code which is
compiled against one version of a library will run without problems
against all future versions of that library with the same major version
number — or similarly that code which runs against a daemon will
continue to run against all future versions of that daemon with the same
major version number.
</p>
<p>
It is possible to apply different levels of API stability to components
within a project. For example, the core functions in a library could be
stable, and hence their API left unchanged in future; while the newer,
less core functions could be left unstable and allowed to change wildly
until the right design is found, at which point they could be marked as
stable.
</p>
<p>Im Allgemeinen werden verschiedene Typen der Stabilität bezeichnet:</p>
<terms>
<item>
<title>Unstable (instabil)</title>
<p>Die API kann sich ändern oder in der Zukunft geändert werden.</p>
</item>
<item>
<title>Backwards compatible (Abwärtskompatibilität)</title>
<p>
Only changes which permit code compiled against the unmodified API
to continue running against the modified API are allowed (for
example, functions cannot be removed).
</p>
</item>
<item>
<title>Forwards compatible (Aufwärtskompatibilität)</title>
<p>
Only changes which permit code compiled against the modified API to
run against the unmodified API are allowed (for example, functions
cannot be added).
</p>
</item>
<item>
<title>Forwards compatible (vollständig stabil)</title>
<p>Es sind keine Änderungen an der API erlaubt, nur an deren Implementation.</p>
</item>
</terms>
<p>
Typically, projects commit to backwards-compatibility when they say an
API is ‘stable’. Very few projects commit to total stability because it
would prevent almost all further development of the project.
</p>
</section>
<section id="versioning">
<title>Versionierung</title>
<p>API-Stabilitätsgarantien sind eng mit der Versionierung des Projekts verknüpft, das betrifft sowohl die Paket- als auch die Libtool-Versionierung. Letztere dient ausschließlich dem Zweck, die API-Stabilität zu überwachen, sie wird detailliert in <link href="https://autotools.io/libtool/version.html">Autotools Mythbuster</link> oder <link xref="versioning"/> erklärt.</p>
<p>
Package versioning (<em>major.minor.micro</em>) is strongly linked to API
stability: typically, the major version number is incremented when
backwards-incompatible changes are made (for example, when functions are
renamed, parameters are changed, or functions are removed). The minor
version number is incremented when forwards-incompatible changes are
made (for example, when new public API is added). The micro version
number is incremented when code changes are made without modifying API.
See <link xref="versioning"/> for more information.
</p>
<p>
API versioning is just as important for D-Bus APIs and GSettings schemas
(if they are likely to change) as for C APIs. See the
<link href="http://dbus.freedesktop.org/doc/dbus-api-design.html#api-versioning">documentation
on D-Bus API versioning</link> for details.
</p>
<p>
For GIR APIs, their stability typically follows the C API stability, as
they are generated from the C API. One complexity is that their stability
additionally depends on the version of gobject-introspection used in
generating the GIR, but recent versions have not changed much so this is
not a major concern.
</p>
</section>
<section id="external-links">
<title>Externe Links</title>
<p>Das Thema API-Stabilität wird in den folgenden Artikeln behandelt:</p>
<list>
<item><p><link href="https://de.wikipedia.org/wiki/Programmierschnittstelle">Wikipedia-Seite zu Programmierschnittstellen</link></p></item>
<item><p><link href="https://de.wikipedia.org/wiki/Bin%C3%A4rschnittstelle">Wikipedia-Seite zu Binärschnittstellen</link></p></item>
<item><p><link href="http://dbus.freedesktop.org/doc/dbus-api-design.html#api-versioning">Dokumentation zur Versionierung der D-Bus-API-</link></p></item>
</list>
</section>
</page>
|