When asked about "What is a Polyfill?" , I ran into comments and searches with the term Shim .
-
What would a Shim be?
-
What is the relationship of the term Shim with the term polyfill ?
- Shim is directly linked to Javascript, such as Polyfill?
When asked about "What is a Polyfill?" , I ran into comments and searches with the term Shim .
What would a Shim be?
What is the relationship of the term Shim with the term polyfill ?
Trying to contribute proactively, and also respecting the answers in English: [ What is a Shim? - In, 2010 . I want to respond in a simple and objective way. So we have the following concept of Shim:
Shim Infrastructure implements a form of hooking application programming interface (API). Specifically, it takes advantage of the binding nature to redirect the Windows API calls to the alternative code - shim itself. [ Technet Microsoft, 2011 ]
At first, we understand that this is just another concept, but considering:
The Microsoft Windows Application Compatibility Infrastructure (Shim Infrastructure) is one such powerful technical solution [see: One of these powerful technical solutions ). As the Windows operating system evolves from version to version change to support new technology, incorporate bug fixes, and implement a change in strategy - changes in the implementation of some functions can affect applications that rely on them. [ Technet Microsoft, 2011 ]
If we consider the idea of hooking ( hooking ) to modify API behavior so we can improve with new technologies or fix bugs if technical solutions powerful features when implementing regression features for legacy applications (or in the case of Polyfill: legacy browsers [ Stack Overflow - , 2017 ]). To illustrate, see the following figure:
OfcoursetheuseofShimInfrastructureisjustified:
Toreducedeploymentcostsandaccelerateadoption,[...]toensurebroadcompatibilityofexistingsoftware,leadingtocompatibilitywiththeengineeringandreleaseprocess.[ Technet Microsoft, 2011 ]
With the above explanation, I hope I have answered: What would a Shim be? .
Now, What is the relationship of the term Shim with the term polyfill?
A shim that mimics a future API providing return functionality for older browsers. [ Paul Irish ]
So the relationship Shim Vs polyfill, is that polyfill - is a Shim in context (if, only if) in that the application is an antidating browser being improved . In case the application is a browser, then we use technical polyfill jargon.
And to finish: Shim is directly linked to Javascript as well as Polyfill?
We can categorize that Shim is in a larger scope, that is, for any application we are implementing API hooks, even for a browser, we are practicing Shim technical solutions. So we can state that Shim is not directly linked to Javascript , nor is Polyfill not connected to javascript directly because we have other languages that implement browser-related functionality.
Reference :
[What is a Shim? - En, 2010], Available at: Site Stack Overflow in English . Access: Apr 8, 2017
Microsoft, 2011 Available in: Site Technet Microsoft . Access: Apr 8, 2017
[Stack Overflow - a, 2017], Available in: Stack Overflow: What is Polyfill? . Access: Apr 8, 2017
[Paul Irish]. Available at personal site . Access: Apr 8, 2017.