Shim (computer science)

from Wikipedia, the free encyclopedia

In the jargon of software development, a shim is a computer program that adds a compatibility extension to an existing application .

description

A shim intercepts API calls and adapts the passed parameters, redirects the calls or, if necessary, carries out operations itself. The behavior is called transparent , since the use of a shim is "invisible" and is not perceived by the user as being there.

Shims are usually used when changes to APIs lead to compatibility problems in which existing applications depend on the functionality of the previous API version. A shim then serves as an additional compatibility level over the new API and continues to provide the old functionality by transforming the requests. Alternatively, you could continue to maintain both versions of the API in parallel, which could mean more work and redundancies, but at the same time lower delay times.

Furthermore, shims can be used to run programs on platforms for which they were not originally developed.

Wrapper vs. Shim

While shims mostly come from API providers to ensure backward compatibility when the API is updated, wrappers are mostly initiated by API users. The aim here is increased flexibility, i.e. the ability to exchange an underlying API without having to look at the rest of the code. A popular use for wrappers are interfaces to database servers .

Examples

  • EcmaScript Shims: Compatibility enhancements for outdated JavaScript engines
  • Windows Shim Infrastructure: Microsoft Windows application compatibility infrastructure
  • Start of unsigned operating system cores, e.g. B. Linux, on computers with UEFI -BIOS under Secure Boot
  • Wine : Wine is an implementation of the functions of the Windows API on GNU / Linux and other Unix-like operating systems. The system calls are passed on to the Linux or Unix kernel and the X Window System.

Origin of the word

The word is originally used in mechanical applications. In this context, shim describes a mostly pointed piece of material (e.g. made of metal or stone), which is used to fill a gap between two objects (e.g. as a support or leveling , see also intermediate layer ).

See also

Individual evidence

  1. Github repository "es-shims". Microsoft, accessed January 27, 2015 .
  2. Understanding Shims. Microsoft, accessed January 27, 2015 .

Web links