API shim
From Wikipedia, the free encyclopedia
In computer programming, an API shim is a small library that converts one API into another. They typically come about when the functions of one API become a part of another, larger, library. In these cases the older API can still be supported as a thin layer on top of the newer, and more general, code.
One example was the support of AppleTalk on Macintosh computers during the brief period in which Apple Computer supported the Open Transport networking system. Thousands of Mac programs were based on the universal AppleTalk protocol; in order to support these programs AppleTalk was re-implemented as an OpenTransport "stack", and then re-implemented as an API shim on top of this new library.
A less successful example occurred when SGI repeatedly attempted to merge Open Inventor with OpenGL Performer. The latter was an offshoot project from people involved in the former, and after a few years of parallel development it became clear there was no reason they could not be re-merged. This led to Cosmo 3D, a universal "higher-level" library over OpenGL, with Inventor and Performer re-implemented as API shims on top. However internal politics and a variety of failed industry partnerships doomed the project as it was handed first to the OpenGL++ group, and then the Fahrenheit project, before being cancelled outright in 2000. Today Inventor and Performer remain separate projects, neither one well supported.
Windows used the term to mean backward compatibility libraries. Shims simulated the behavior of previous versions of Windows for applications that relied on incorrect behavior.