HTML5 Adoption Strategies
HTML5 Adoption Strategies
Join the DZone community and get the full member experience.Join For Free
Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.
Why Do We Need Adoption Strategies?
You might ask yourself why do you need an adoption strategy for HTML5? The answer is simple. HTML5 includes many specifications that evolve in different rates. Therefore, the specification support in browsers is complicated to implement for the browser vendors. There are stable specifications such as Geolocation which are implemented by all the major browsers and there are less stable specifications like Web Sockets that aren’t. So, if you want to use an HTML5 specification in your web application how can you do that without breaking your application in some of the browsers? The answer to this question is to ask yourself whether you really need the feature. If you really need it then you can use adoption strategies in order to implement the feature.
Here is a list of strategies that you can apply in order to adopt HTML5:
- Lowest common denominator – this strategy is the simplest and it’s what I call the ostrich strategy (lets not implement HTML5 at all…). Applying this strategy is to look for the features that are implemented in all the browsers (or all the major browsers) and use them. This of course leave you with small amount of HTML5 specifications (or with non if you target very old browsers).
- Vertical slices – in this strategy you decide that you only target a specific HTML5 functionality and therefore “lose” browsers that don’t implement it. If you do that for public internet applications it might harm your application’s credibility (since it won’t work for all the other browsers). This strategy is more appropriate for targeting mobile devices that is a growing market with less browsers to support and high HTML5 browser adoption.
- Using fallbacks strategies – Some elements and APIs can’t be achieved with Polyfills (for example the Video/Audio element). In this case you can use the HTML5 feature but you create a fallback if it isn’t exists. For example adding a Video element can have a fallback into Flash/Silverlight if the Video tag isn’t supported in the browser.
When you want to adopt HTML5 today you need to pay attention not to break your web application in older browsers and also in newer ones. This can be achieved by imposing some strategies such as the strategies that I mentioned in the post. If you have other strategies that you want to share with me please do so in the comments.
Published at DZone with permission of Gil Fink , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.