February 7, 2010

HTML5 is a Contradiction

I attended a presentation by Molly.com recently where she gave an overview of what HTML5 is trying to do and some of what it will bring to the "browser as a platform" over the next decade. A lot of what was presented is a welcome improvement over the current situation faced by web developers. But I did have two criticisms, which I voiced and which HTML5 does not currently address.

The decision to no longer version the state of the technology is a mistake. As I understood from the talk, one goal of HTML5 is to make it so it is backwards compatible with everything currently out there and to carry that backwards compatibility forward into future versions. The former is an admirable goal, but the latter is a misguided attempt at making HTML5 future compatible and technology doesn't work that way.

I brought up the example of the required attribute on form elements. If the required attribute was not part of HTML5 right now, and was later added, then making use of the tag in future web applications would mean your application is broken in older HTML5 implementations. Since there is no version, you cannot state that your application requires a browser to support a specific version and you are left with the sorry state of having to ask your runtime environment if a feature exists or coding for the least common denominator. I argue that the latter is going to maximize compatibility with minimal headache.

Can you imagine if Java or .NET did things this way? Your current Java 1.6 source code would be limited to API provided in Java 1.0 and everything else would be bundled libraries or your own code if you didn't want to maintain crazy special-case code for every new Java API that's come out in the past 10 years.

And this is exactly the problem Android is facing. iApp developers can write something once and know that it will run fine on all iPods, iPhones, and now iPads. This dramatically decreases code complexity and allows developers to focus on the application rather than the platform. Android developers are not able to simply require an OS version. Different phones support a different set of APIs and application developers have to insert special-case code for different hardware. It's a nightmare.

Of course this is the way things are in the world right now. Which web developers are used to and maybe don't think is a big deal. But if you're going to spend the time to change things for the better, you have to do it right.

This leads to my second criticism. Due to the annoying nature of web development right now, where a site like QuirksMode is necessary and you have to test every change in a dozen browser/platform combinations, HTML5 is admirably stepping up and requiring all browsers to implement features exactly the same. The specification is very detailed and the goal is not to leave anything up to chance. Cover all the cases.

But some of the features covered by HTML5 are currently, or may be in the future, features that are provided at a level lower than the application. Mac OS X's widget implementations is a great example of this. You no longer code your own text input widgets, or your own spell check. But HTML5 includes a spell check attribute which, if you want to avoid ambiguity, would require the same implementation in all browsers. As a result, my experience using a web browser on Mac OS X may be wrong. Wrong in the sense that it does not provide the same experience consistently provided by all other user interfaces on my platform.

So you see, HTML5 is a contradiction because it says everything must be strictly defined so all web applications look and behave the same in all browsers and on all platforms while at the same time saying the feature set is undefined. The former because the engineers are tired of the horrible state of web development which cannot scale and is a tremendous drain, and the later because the thinkers don't want to limit themselves or have to come back to the 10-year drawing board again in two years when a new feature is added to deal with advances in technology.

You can't have your cake and eat it too.

Posted by josuah at February 7, 2010 10:34 AM UTC+00:00

Trackback Pings

TrackBack URL for this entry:


Post a comment

July 2013
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31