Shim (computing)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 206.57.127.7 (talk) at 08:37, 27 April 2009 (Fixed grammar mistake.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer programming, a shim is a small library that transparently intercepts an API, changing the parameters passed, handling the operation itself, or redirecting the operation elsewhere. Shims typically come about when the behaviour of an API changes, thereby causing compatibility issues for older applications that still rely on the older functionality. In these cases, the older API can still be supported as a thin layer on top of the newer code.

Examples

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.[citation needed]

The Windows Application Compatibility Toolkit (ACT) uses the term to mean backward compatibility libraries. Shims simulate the behavior of older versions of Windows for legacy applications that rely on incorrect or deprecated functionality, or correct the way in which poorly-written applications call unchanged APIs, for example to fix LUA bugs.[1]

See also

References

  1. ^ "Microsoft Application Compatibility Toolkit 5.0". Microsoft. 2007-12-11. Retrieved 2008-06-24.