HTML5 Denver Users Group – Stop Using Native HTML5
The following is a short introduction provided by Kyle Simpson (@getify):
“No, don’t stop using HTML5, just stop using the native HTML5 JavaScript API’s directly. They’re still in flux, there’s still bugs that need to be shim’d, etc. Your code needs to use these features, but it needs to be more robust.
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:
Facades
- Hides complexity; design pattern.
- This is a wrapper around what we already have.
- Insulation to help protect your code against browser nightly updates.
Specs
- 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.
Vendor Prefixes
- Allows a browser to recognize that it’s not standardizes yet.
- Prefixes are hard to deal with and harmful to robust production code.
Progress
- Good for browsers.
- Good for industry.
- Harmful for our code because of changing vendor prefix, deprecated jQuery events, etc.
Verbosity
- 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.
Framework Design
- Not a polyfill or shim.
- We’re not trying to create functionality where it doesn’t exist.
- Modular.
- Fix* bugs.
- Smotthe quirks.
Favorite quote of the nite: “Javascript is on the rise faster that anything else on the web.”