Backward compatibility

From Wikipedia, the free encyclopedia

In technology, especially computing, a product is said to be backward compatible (or downward compatible) when it is able to take the place of an older product, by interoperating with other products that were designed for the older product.

Backward compatibility is a relationship between two components, rather than being an attribute of just one of them. More generally, the following criteria need to be met:

  • There is a defined functional interface "I".
  • There is a server component "S" which provides the functionality of I.
  • There is a client component "C" which depends on S via I.
  • A new server component "S2" is created which has greater functionality than S and which it exposes via a new interface "I2".
  • All the functions of I are also provided by S2. In other words, I is a subset of I2.

When these criteria are met, S2 is backward compatible with S because it still supports interface I and therefore the client C can be switched over to use S2 and still operate correctly.

Backward compatibility is the special case of compatibility in which the new server has a direct historical ancestral relationship with the old server. If this special relationship does not exist then it not usually spoken of as "backward" compatibility but is instead just "compatible" — a consistent interface allowing interoperability between components and products that were each developed separately.

Data does nothing in the absence of an interpreter, so the notion of compatibility does not apply to document files, it only applies to software. In the case of a program that creates document files, a new version of that program ("v2") is said to be backward compatible with the old version of the program ("v1") when it can both read and write documents that work with v1. Everything that v1 could do must also be possible with v2, including saving documents that can be read by v1. In that case, if the criteria outlined earlier are applied, the interface "I" supported by both software versions is actually their common document format. The metaphor is completed by observing that S2 is v2 and C is v1. The old version would have performed the roles of both S and C consecutively, because using v1 to open a previously saved document is functionally equivalent to v1 requesting data from an earlier instance of v1 via an interpreter interface I that both reads and writes files.

If a newer software version cannot save files that can be read by the older version it is not backwards compatible with the older version, although it may provide an irreversible upgrade capability for the old files. This situation has often been used strategically by software vendors to force customers to purchase upgrades since, over time, the number of data files usable by an old version diminishes at a rate proportional to the number of other customers that have upgraded.

Levels of compatibility vary. In software, binary compatibility and source-compatibility are distinguishable. Binary compatibility means that programs can work correctly with the new version of this library without requiring recompilation. Source compatibility requires recompilation but no changes to the source code.

Many platforms rely on emulation, the simulation of an older platform in software, to achieve backward compatibility.

[edit] Compatibility checking

Approaches for checking compatibility between the client program and the server component include:

  • Check by version number;
  • Check by an interface definition language (IDL)
  • Check by just-in-time test runs (the client program gives some example inputs to the server component to see if the component returns the desired example outputs).

[edit] Examples

[edit] See also