Polyfill (programming): Difference between revisions

Content deleted Content added
Kiirran5 (talk | contribs)
Tag: gettingstarted edit
Line 10:
 
==Where ''polyfill'' came from?==
ItAccording to [http://remysharp.com/2010/10/08/what-is-a-polyfill/ his blog post on the matter], it was when Remy SparkSharp was co-writing the book 'Introducing HTML5' back in 2009. He sat in a coffeeshop (as you do) thinking he wanted a word that meant “replicate an API using JavaScript (or Flash or whatever) if the browser doesn’t have it natively”.
 
Shim, to mehim , meant a piece of code that you could add that would fix some functionality, but it would most often have it’s own API. He wanted something you could drop in and it would silently work (remember the old ''shim.gif?'' that required you actually inserted the image to fix empty ''td'' cells – I wanted something that did that for me automatically).
 
He knew what he was not progressive enhancement because the baseline that he was working to required JavaScript and the latest technology. So that existing term didn’t work for him.
Line 20:
So he wanted a word that was simple to say, and could conjure up a vague idea of what this thing would do. Polyfill just kind of came to him, but it fitted his requirements. Poly meaning it could be solved using any number of techniques – it wasn’t limited to just being done using JavaScript, and fill would fill the hole in the browser where the technology needed to be. It also didn’t imply “old browser” (because we need to polyfill new browser too).
 
Also for him, the product Polyfilla (spackling in the US) is a paste that can be put in to walls to cover cracks and holes. IHe really liked that idea of visualising how we’re fixing the browser. Once the wall is flat, you can paint as you please or wallpaper to your heart’s content.
 
He had some feedback that the “word should be changed” but it’s more that the community at the time needed a word, like weit needed [[Ajax]], [[HTML5]], [[Web 2.0]] – something to hang our ideas off. Regardless of whether the word is a perfect fit or not, it’s proven it has legs and developers and designers understand the concepts.
 
He intentionally never really pushed the term out there, he just dropped it in a few key places, and he thought it’s when +Paul Irish gave a presentation some months later, directly referencing the term polyfill, was when the term really got a large amount of exposure (He thought this was also helped with the addition of the [[Modernizr]] [[HTML5]] [[shim]](s) & ''polyfill'' page).