WebKit, Mozilla, and Chrome are seeing some phenomenal gains in the arena of JavaScript and HTML rendering standards and performance. If you bust out your magnifying glass, you will find a one pixel tall bar on those charts: Internet Explorer, the browser with the largest user share, is trailing the pack. And that is causing thousands of tiny violins to play in unison with the cries of web developers claiming that Microsoft is holding back Web 2.0. And that may be true; that is, if Web 2.0 will have HTML, JavaScript, AJAX, CSS, et al championing this so-called revolution. (These technologies will be from here-in referred to as just HTML/JS for brevity)
One of the prominent characteristics of Web 2.0 applications is that many of them are mimicking traditional desktop applications while using the browser as the application platform. The primary benefit to this is that the application is then cross platform, and that your data is available anywhere. A platform agnostic application runtime, eh? That sounds familiar. Essentially, a primary goal of Web 2.0 is to bring web applications to the desktop.
But, HTML/JS was not intended to behave or be used in the manner that it is heading. Every 10 or so years, there have been fundamental changes in application development, and it is beginning to show its age. To paraphrase the past and my vision of the future of development:
1975 – Imperative Programming fundamentals: C, Pascal, Basic
1985 – Object Oriented: C++, Ada
1995 – Rapid Application Development: Java, Visual Basic, Delphi (HTML and JavaScript are born)
2005 – Metaprogramming/Reflection, XML integrated development (LINQ to XML, XAML, XUL): Ruby, .Net, Python
2005 and beyond – Language Agnostic, Platform Agnostic, Web based distribution, Ubiquitous data access
HTML/JS, initially a static markup driven platform, is trying to morph into a desktop application platform tied to the web: the current/next application development platform. I think its time to put that horse down. And apparently so does Microsoft (Silverlight) and Adobe (Air). Rather than try to bring the web to the desktop, they’re approaching it from another angle: bring the desktop to the web. I will dub this movement Desktop 2.0. [0]
My blatant ageism aside, what is wrong with HTML/JS?
1) Everything you write is automatically Open Source
Your offline enabled application will have the entirety of it’s HTML/JS source code available. Thousands of man hours of a company’s IP can be easily inspected and reproduced. And though this concept would probably make GNU Richard Stallman shit his diapers with glee, 99.9% of the time, open source models are not profitable. Money makes the world go around.
2) Performance Blows
JavaScript performance will always and forever suck compared to languages that support strict typing.
3) No Developer Freedom
“If you took every bad thing about C and every bad thing about Visual Basic and added in a few more bad things, it would be almost as bad as Javascript.” Developers should be able to do application and web development in any language of their choice. Being restricted to an eternity of JavaScript development is sort of how I imagine the ninth circle of hell. [1]
4) HTML has no Sex Appeal
It’s just too hard to make HTML sexy. Don’t even get me started on animating said HTML. And yes I know about how awesome Canvas is supposed to be. So following that to its logical end, web pages will eventually just become a HTML hosting a single canvas:
<html>
<head>
<script type="text/javascript">
function drawStuffOntoCanvas()
{
}
</script>
</head>
<body>
<div>
<canvas id=”the_canvas”></canvas>
</div>
</body>
</html>
How is that any different from HTML hosting a single Silverlight or Flash object?
<html>
<body>
<div id="SilverlightHost">
<script type="text/javascript">
createSilverlight("/pathToSilverlight/Page.xaml", "SilverlightHost", "Silverlight Application");
</script>
</div>
</body>
</html>
Well, for starters, Canvas is not markup driven like XAML/MXML. Why is HTML 5 taking a step backwards in UI development? Canvas is a flimsy JavaScript Band-Aid on the bullet wound that is HTML. [2]
To summarize, I can’t imagine any desktop applications of real significance being created with the existing web technologies. Imagine the best attempt of creating a Web 2.0 version of Microsoft Office in HTML/JS. Actually, you don’t need to imagine. Just visit Google Docs. Does anyone actually use that to do real work? The applications themselves are extremely crippled in comparison to their desktop counterparts. The only value it really provides over Microsoft Office is ubiquitous data access. And sadly, I’d rather use Sharepoint, which is no spring chicken either. [3]
Furthermore, as the line between the Web and the Desktop is blurred, you will see developers from one camp bleeding into the other. They’ll be presented with two technologies that are trying to achieve the same thing. Learning HTML/JS allows developers to build great web sites, but clumsy desktop applications. Learning a “Desktop 2.0” technology will allow that developer to build better web sites as well as great desktop applications. What do you think they’ll choose?
[0] Crap, it looks like someone else beat me to it. With a similar article title and thesis to boot. WTF!
[1] Why is it called JavaScript anyways? About the only thing Java and JavaScript have in common anymore is how much they suck.
[2] Someday, someone, somewhere will invent a XML markup that can be converted at runtime into Canvas JavaScript which is then eval’d and consumed by web pages. Files that contain the Canvas markup will have the “.cnvs” file extension. Usage of CNVS will become widespread and ECMA will standardize this format. Soon everyone will write their web pages in entirely CNVS, and browsers will forego the necessity of the HTML host. HTML slowly withers away. </jest>
[3] Live Mesh would also allow you to access your documents from anywhere, seamlessly. I actually prefer that to Sharepoint. It’s pretty awesome, truth be told.