Saturday, March 16, 2013

5 Reasons to Reject the WebKit Monoculture

Free CSS3 Web Tmplate

Opera’s WebKit announcement has divided developer opinion. Some are pleased there are fewer rendering engines to support (not that many developers actively tested Opera). Others state this is the beginning of the WebKit monoculture and IE6-like doom is upon us. The truth is somewhere in between but there are several reasons for concern.

1. WebKit != IE6, but…

WebKit is an open source rendering engine. It is not owned or controlled by a single organisation; anyone can use and modify the code. In comparison, IE (and its Trident engine) is owned by Microsoft and only available on Windows. Microsoft decision to abandon browser development could not occur in the WebKit world.
However, it’s important to remember that Apple and Google — two of the most powerful global IT companies — are in control of the most popular WebKit browsers. Apple is also responsible for handling WebKit developer agreements and either company can accept, reject or modify WebKit features to their commercial advantage. While you may be able to update the core engine, it won’t matter unless those changes eventually reach Chrome and Safari.

2. WebKit is not one engine

Some developers believe cross-browser compatibility issues will disappear if all vendors use the same engine. It would certainly make development easier, but it’s naive to think all problems would be eradicated. Test a reasonably complex design in Chrome and Safari today and you will encounter differences.
<script language="JavaScript" type="text/javascript"> document.write('<a href="http://adclick.g.doubleclick.net/aclk?sa=L&ai=B68MllzdEUaqEK4PCigfEooG4Br66rYkDAAAAEAEgrJH9ATgAWN6PsNlEYJEBsgERd3d3LnNpdGVwb2ludC5jb226AQlnZnBfaW1hZ2XIAQnaAUBodHRwOi8vd3d3LnNpdGVwb2ludC5jb20vNS1yZWFzb25zLXRvLXJlamVjdC13ZWJraXQtbW9ub2N1bHR1cmUvwAIC4AIA6gIbLzc0NDg3OTIvSW5BcnRpY2xlXzcyOHg5MF8x-AL00R6AAwGQA5oImAPkCqgDAeAEAaAGFg&num=0&sig=AOD64_18Tv0a8y44c2bN-415FY_FwQ-B2g&client=ca-pub-9603645151104616&adurl=http://clk.atdmt.com/MRT/go/410975167/direct;wi.728;hi.90/01/" target="_blank"><img src="http://view.atdmt.com/MRT/view/410975167/direct;wi.728;hi.90/01/1276335830"/></a>'); </script> <noscript> <a href="http://adclick.g.doubleclick.net/aclk?sa=L&ai=B68MllzdEUaqEK4PCigfEooG4Br66rYkDAAAAEAEgrJH9ATgAWN6PsNlEYJEBsgERd3d3LnNpdGVwb2ludC5jb226AQlnZnBfaW1hZ2XIAQnaAUBodHRwOi8vd3d3LnNpdGVwb2ludC5jb20vNS1yZWFzb25zLXRvLXJlamVjdC13ZWJraXQtbW9ub2N1bHR1cmUvwAIC4AIA6gIbLzc0NDg3OTIvSW5BcnRpY2xlXzcyOHg5MF8x-AL00R6AAwGQA5oImAPkCqgDAeAEAaAGFg&num=0&sig=AOD64_18Tv0a8y44c2bN-415FY_FwQ-B2g&client=ca-pub-9603645151104616&adurl=http://clk.atdmt.com/MRT/go/410975167/direct;wi.728;hi.90/01/" target="_blank"><img border="0" src="http://view.atdmt.com/MRT/view/410975167/direct;wi.728;hi.90/01/"></a> </noscript>
WebKit is forked and evolves along different paths. Vendors have different devices, deployment schedules and requirements. For example, Apple regularly add proprietary iOS-specific properties which may never reach the W3C or appear as recommendations.

3. WebKit is not the best engine

Those who support the monoculture argue that WebKit has won; it’s beaten Gecko and Trident. They are wrong. No engine is perfect, but you learn to forgive or avoid issues when you concentrate on a single browser.
WebKit is excellent and it was certainly the first to hit the CSS3 animation headlines. But if you think it’s ahead of all others, try using SVGs. Attempt animating pseudo elements. Use an unprefixed transform, animation or calc() function. Code using newer HTML5 form elements. Try persuading Firebug fans to abandon their favorite development tool. Don’t take my word for it — Dave Methvin of the jQuery core team and president of the jQuery Foundation states:
Each release of Chrome or Safari generates excitement about new bleeding-edge features; nobody seems to worry about the stuff that’s already (still!) broken. jQuery Core has more lines of fixes and patches for WebKit than any other browser. In general these are not recent regressions, but long-standing problems that have yet to be addressed.
When we started our jQuery 2.0 cleanup to remove IE 6/7/8 hacks, we were optimistic that we would also be able to remove some bloat from lingering patches needed for really old browsers like Safari 2. But several of those WebKit hacks still remain. It’s starting to feel like oldIE all over again, but with a different set of excuses for why nothing can be fixed.
WebKit, Gecko, Presto and Trident are all good rendering engines. They have strengths, they have weaknesses, but none is an outright winner in all areas.

4. A monoculture means and end to standards

One group of people was wholly responsible for the IE6 debacle…
web developers
IE6′s longevity was not the fault of system administrators, slow-moving organizations or an evil Microsoft. Ten years ago, developers targeted IE — not web standards. IE6 was the standard born from a monoculture; few considered a future where IE did not exist.
While there may never be a single WebKit engine, developers will choose it over W3C standards. If something works in WebKit browsers, it won’t matter whether that feature is proprietary, implemented incorrectly or fails elsewhere: it becomes the standard. At that point, you have to hope WebKit is never superseded by a better alternative — a horrible thought.

5. Competition is good

I’m saddened to see the demise of Presto but Opera made a logical business decision. Their primary market is mobile devices and Apple control the only HTML engine permitted on the iPhone and iPad. However, those restrictions do not apply to Microsoft and Mozilla. They have nothing to gain from switching to WebKit:
  • If Microsoft scrapped Trident, it would affect every Windows application using web integration. It would cause chaos. I’m sure it would be technically possible to implement an API translation bridge, but how long would that take and what commercial benefit would it offer?
  • Mozilla is not a commercial operation; there are no stakeholders or profit targets. The organization exists because it has Gecko, XUL and a range of related technologies. While they could switch to WebKit, it would end major projects such as Firefox OS.
Competition has been good for the web industry. A WebKit monoculture brings short-term development ease at the expense of long-term evolution and growth. Be careful what you wish for.

No comments:

Post a Comment