HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Dart's plan to make it easier for you to build web apps

Google Developers · Youtube · 28 HN points · 2 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Google Developers's video "Dart's plan to make it easier for you to build web apps".
Youtube Summary
Title: Dart: Google's plan to make it easier for you to build web apps

Bob Nystrom, engineer on the Dart project, presents an encore session of his OSCON 2012 talk about the Dart project.

Abstract:

When we announced Dart, it kicked up a bit of a dust storm. In this talk, I discuss the challenges that Google and others face when building web apps today. I introduce Dart and show how its features were designed specifically to address some of those challenges.

You'll see how Dart protects you from many of the dark corners and sharp edges of JavaScript and the DOM. When your programs grow and evolve over time, you'll see how Dart can help keep your app nimble and maintainable. Thanks to Dart's Dart to JavaScript compiler, you'll see how you get all of that while still being able to run on any browser that supports modern JS and without the bad karma of fracturing the web.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
This video (at 26:13) gives a pretty good example of why these might be useful: "Dart: Google's evil plan to make it easier for you to build web apps" http://www.youtube.com/watch?v=9RCuW6K1afs
Jul 25, 2012 · 24 points, 8 comments · submitted by vamsee
latch
I feel pretty confident in saying that we aren't going to find a Dart VM in all (or any?) other browser for the foreseeable future.

With that in mind, Dart just feels like CoffeeScript + jQuery's Sizzle + Underscore. I don't see how using jQuery to create a button is any more "routing around the problem" of DOM creation than using Dart's framework, when they are both translated to document.createElement.

I rather have smaller individually pieces for the greater flexibility it provides. Where Dart clearly has the advantage is in tooling...but that's not nearly enough for me.

Which isn't to say Dart is evil, but I don't see how they'll make web development easier when, in practice (no VM), they aren't bringing anything new.

None
None
cantlin
I don't think the predicted lack of support for a Dart VM outside of Chrome is a significant factor – a strength of the linked video was that it focused on Dart-delivered-as-JS.

> I don't see how using jQuery to create a button is any more "routing around the problem" of DOM creation than using Dart's framework, when they are both translated to document.createElement.

With Dart, you don't need to send 96k of jQuery over the wire. Better, you have the returned elements as a baked-in data type. I imagine there's a pleasant consistency to being able to append an element to a <ul> with the same API you'd use to manipulate any other list.

latch
With Dart you need to send the Dart framework over the wire. That's my point, you've replaced the flexibility of sending the framework(s) you want/need and haven't gained anything.

Sure, the Dart framework is smaller, but it also does less. If you don't need everything that comes with jQuery, you can swap it out for something smaller, like zepto or TinyDOM - which make Dart look massive.

jQuery, zepto, xyz, abc, ... all give you a consistent way to manipulate DOM objects.

spankalee
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.
thebluesky
The inclusion of type information for method parameters makes for some pretty nice tooling. Check out the error checking and code completion at around 30:00
arcos
Nope. This won't get any more traction than the first time it made the rounds. Learn JavaScript! https://www.youtube.com/watch?v=taaEzHI9xyY&feature=play...
cantlin
I found this enticing in a way that my previous glimpses of Dart haven't been. Summary for the video-averse (conclusion begins at 38:03[0]):

  – Dead code can be eliminated.
  – A little typing goes a long way.
  – The DOM doesn't have to suck.
  – Built-in syntax, your semantics.
  – Classes for stating intent and good tools.
  – Don't be evil: compile to Javascript.
For me the notion of swapping out existing client code compilation steps with a Dart compilation step might almost be worth it just for a legible, declarative class syntax. Throw in a vastly improved DOM API and some sensible syntax choices (e.g. same form for calling a getter as accessing a field, avoiding getFoo() boilerplate) and I'm half way to having a play.

[0] http://www.youtube.com/watch?v=9RCuW6K1afs#t=38:04

MatthewPhillips
JavaScript supports getters too.

https://developer.mozilla.org/en/JavaScript/Reference/Operat... https://developer.mozilla.org/en/JavaScript/Reference/Global...

WayneDB
Every browser doesn't support them though. The nice thing about a language compiled to Javascript is that you don't have to write any code to check if you can use getters.
Jul 24, 2012 · 4 points, 0 comments · submitted by dchest
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.