Friday, February 21, 2014

Dart!

Lars Bak who developed the V8 JavaScript engine for Chrome and has done extensive work in the name of optimizing performance for virtual machines, lead in a talk by a John Talley on Lars' new scripting language, Dart, in a prerecorded video displayed on a wall at Spanning Thursday night. He said that one could learn Dart in just one hour and supposedly there is a tutorial online as a part of something called Dart Flight School which shows you how to do just that, but the one hour timebox became clearly comedic once John started showing off code from an entirely new scripting language and descended into how out to override operators. The examples given during a fire hose or syntax-heavy geek out were really too much for me to memorize and I just sort of took it in numbly. To me Dart looks just as complicated a C#. Dart is Google's C#, by which I mean it is to be its premiere scripting language that it pushes, and I'd take it seriously as I'd take Google seriously if I were you. Some things about Dart are that it has been in version 1.0 since November, it is dynamic, and compiles to JavaScript. dart2js is the name of the compiler. There was much talk of Dart one day just running uncompiled, as is, in Chrome (and then, hopefully, other browsers) but presently the only way you may run it uncompiled is through Dartium (built in Chromium which is the open source project from which Google crafts its Chrome browser and also the Canary browser which is like the latest version of Chrome that is not yet well tested) which is the preview browser of sorts within the Dart IDE which is called "The Dart Editor" which is in fact a doctored up Eclipse. Just as you might preview an ASP.NET MVC project in Cassini, you might preview a Dart project in Dartium. Dart is for both the front end and the back end. You may use it with AngularJS or Polymer (a comparable framework to AngularJS) in much the same way you might use C# with Razor in an MVC app, and you may also use Dart to touch a database or write to flat files thus allowing you to work front-to-back in JavaScriptland without having to use Node.js for the backend stuff! You'd use the familiar moustache notation of AngularJS in your HTML. Dart itself has interfaces, and mixins, and garbage, collection, and lots of other things you can't hope to understand in an hour's time. Every Dart app gets a pubspec.yaml file for package management, which allows Dart to know what it needs to bake in when it compiles. Unused code is dropped from the compiled code. It is shaken out in "tree shaking." Dart supports the asynchronous qualities of JavaScript but not truthiness vagueness. Let's see, what else do I want to say? I think it jives with Firebase which is an API for storing JSON objects "in the cloud." Hmmm... A Mr. Charles d'Harcourt spoke after John and showed off a simple app that he made.

No comments:

Post a Comment