Skip to content

Comment on Dart's plan to make it easier for you to build web appsparent

Comments

Eventually (maybe already) you wont' have to send the whole Dart framework down the wire, just the parts you use. And because it's compiled some cases will not use any "framework" at all that would need to be downloaded, they will just be compiled into the equivalent JavaScript.

Take the button creation example.

With jQuery you have to use an odd syntax, IMO, and it requires the whole jQuery library to be downloaded:

  var button = $('<button>');
With Dart creating a button follows the same syntax as creating other objects is compiled away:
  var button = new ButtonElement();
which compiles to JS:
  var button = document.createElement('button');
This way you get a nice DOM and in some cases no overhead at all. Other cases might have runtime code that needs to be included like jQuery or Zepto, but without compilation they will always have to include their whole library.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.