Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

First look: Google Dart vs. JavaScript

Dart nails some of Web programming's worst pet peeves, but is it good enough to beat JavaScript?

  • Print
  • Feedback

Page 4 of 4

Google Dart: Will it win?
Does Dart have the charm and charisma to attract enough programmers and grow into the dominant language on the Web? There are certainly plenty of new features, and the authors did a nice job of cleaning up some of the most annoying cruft that's getting in the way of progress in the HTML/JavaScript/CSS stack.

One roadblock facing Dart is the fact that JavaScript is surprisingly agile, and JavaScript programmers have become very adept at reforming it to be just what they want. You don't need to migrate to Dart to get the nice class structure Google added -- programmers are already experimenting with bolting one onto the JavaScript juggernaut. The jClassy project is just one example. Libraries like Dojo and YUI have nice, elaborate mechnisms for loading just the code that's necessary. And you don't need to wait for Dart to emulate jQuery; you're probably using jQuery already.

The immediate plan is for Dart code to be translated into JavaScript, and this mechanism should work well enough. The code crashed when I loaded it into IE 8, but it ran smoothly when I switched over to Chrome.

But there may be deeper practical issues. The very simple program that prints "Hello World" is converted into 231,503 lines of code, many of them fairly long. I pushed this code through the built-in optimizer, and the result was still 183K. This overhead, or the ensuing bandwidth bills, will give developers for any popular site a reason to pause.

That will change if and when Dart is built into the browser. That day will probably come relatively soon, thanks to the way that Google is open-sourcing the code for Dart. The rest will be up to Web programmers.

The good news is that if they choose to come, they'll find a comfortable, familar structure that's cleaner and a bit better lit than the current world of HTML, JavaScript, and CSS. The structure is pure, and maybe that will be enough to attract the hordes.

This article, "First look: Google Dart vs. JavaScript," was originally published at InfoWorld.com. Follow the latest news in software development, languages and standards, JavaScript, and HTML at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.


  • Print
  • Feedback

Resources