Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a shim repository?

Tags:

git

bower

In the context of web programming. What is a shim repository?

For instance, when I search "handlebars" in the bower package search page one of the result is:

"Shim repository for Handlebars.js"

like image 602
Esteban Filardi Avatar asked Oct 10 '14 14:10

Esteban Filardi


People also ask

What is a shim in programming?

In computer programming, a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere. Shims can be used to support an old API in a newer environment, or a new API in an older environment.

What is an API shim used for?

Shims can be used to support an old API in a newer environment, or a new API in an older environment. Shims can also be used for running programs on different software platforms than they were developed for.

What is shimming and how to use it?

What is shimming? Sometimes we need to support older APIs in a newer platform or newer APIs in an older platform. We use shimming for that purpose. A shim is a library that can be used to intercept an API and then it can change the arguments passed, redirect the operation or handle the operation, etc.

What is the difference between Shim and polyfill?

Shim is a simple library that brings a newer API to an older platform environment. Shim code could add (i.e. JavaScript) that would fix some functionality, but it would most often have its own API. Polyfill is something you could drop in (i.e. JavaScript) and it would silently work to imitate existing browser APIs that are otherwise unsupported.


1 Answers

I don't think "shim repository" is a standardized term in web programming - its just how that specific project - the Components project - describes the repositories they create as stand-ins for those popular 3rd-party components.

Those repositories are "shims" in the sense that they adapt the releases of those popular components into a standard format needed by the Components project to support the package managers that the Components project targets.

like image 88
Bert F Avatar answered Sep 23 '22 02:09

Bert F