The following is a short introduction provided by Kyle Simpson (@getify):
What you need is to use in your apps is a thin facade (wrapper API) around those features, so that as things change, bugs come and go, etc, all that needs to change is the internals of your facade, and not your actual app code.
H5API is a project to build these thin facade APIs for the various HTML5 native APIs. We’ll examine why we need something like this, and how H5API will help us build more robust HTML5 apps.”
Here are my notes from Kyle Simpson’s presentation:
- Hides complexity; design pattern.
- This is a wrapper around what we already have.
- Insulation to help protect your code against browser nightly updates.
- The best part about standards is that there’s so many to choose from.
- The browser lies.
- Specs are hard to understand.
- Not well specified.
- Allows a browser to recognize that it’s not standardizes yet.
- Prefixes are hard to deal with and harmful to robust production code.
- Good for browsers.
- Good for industry.
- Harmful for our code because of changing vendor prefix, deprecated jQuery events, etc.
- The more code you have to write to get something done, the more chances you are to get something wrong.
- Hurts our production code because there’s more changes to create bugs.
- Not a polyfill or shim.
- We’re not trying to create functionality where it doesn’t exist.
- Fix* bugs.
- Smotthe quirks.