HTML5 Zone is brought to you in partnership with:

Eric is the Editorial Manager at DZone, Inc. Feel free to contact him at egenesky@dzone.com Eric has posted 804 posts at DZone. You can read more from them at their website. View Full User Profile

Dart Refcard Author: Chris Buckett

02.25.2013
| 4796 views |
  • submit to reddit

This week's Refcard is on the upstart web scripting language out of Google, Dart.  Today we have an interview to share with the card's author, Chris Buckett.  Chris is probably one of the biggest champions in the community for Dart.  He's a Google Developer Expert, the maintainer of blog.dartwatch.com , and the author of Dart in Action.  Let's jump right in...

Tell us about your professional history and how it informed your authorship of the Core Dart Refcard.


 I have been developing in one way or another software since the mid 90s, using  Delphi, .net, Java and some of the more dynamic languages such as Ruby and Python and JavaScript. Over the past few years I have been focussed on some of the problems that development teams have when building complex software, especially with regards to browser-based applications.  Various solutions to building complex web applications have appeared, all addressing the problems inherent in integrating JavaScript from multiple, dispersed developers.  Solutions such as Google Web Toolkit and Closure Compiler spring to mind, and the latest iteration of these tools is Dart, which promises to make large-scale web development problems more manageable, as well as providing performance improvements to end users in the browser.  Dart looked like an exciting prospect when it was first talked about, and having used it for over a year now, I'm certain that it has a promising future.
 

The early claims of Dart being a Javascript "assassin" were often oversimplified or exaggerated -  what do you think of these claims?


Those claims make the incorrect assumption that Dart is out to replace JavaScript.  JavaScript, like C/C++ will be around for a long time, and there will still be a long term demand for those skills.  But just as many developers these days use a higher level abstraction and great tooling when coding on the server side, such as with Java or C#, there is a space to bring a higher level of abstraction and great tooling to the client side.  Many "server side" developers have been coding Java come to dynamic browser languages such as JavaScript, and think "where are the tools?"  And this is a valid question, and it is partly the design of JavaScript that makes it such a difficult language to provide the same level of tooling for.  The same issue applies when optimizing virtual machines - JavaScript is sometimes too dynamic.  Dart on the other hand, whilst being a dynamic language, is designed from the start to be toolable - the static analyzer and the Dart Editor tools can be thought of as reference implementations of Dart tools.  
  Dart brings the same level of tooling that server-side developers traditionally expect, opening up the possibility of developing client-side browser apps to a whole new breed of developers.  
 
What makes the Core Dart Refcard a must-have reference for Dart developers?

The Core Dart Refcard describes the core syntax and concepts that every Dart developer needs to know.  Dart as a language shares much with Java and JavaScript, but there are some key notable differences, for example, Dart has Classes and Interfaces like Java, but it also has Function objects, like JavaScript.  The Dart Refcard gives quick, concise examples that you can repeatedly refer back to.
 
What are some other useful tutorials or resources that you would suggest for developers who are interested in Dart?

The dartlang.org website has an excellent tutorial callled "A Game of Darts" that is growing all the time.  You can also find numerous articles on the dartlang website, some containing information about how to use specific APIs, and others discussing technical decisions as Dart was being created.  To keep up to date with the latest Dart news, sign up for the weekly Dart newsletter at http://dartweekly.com , or if you prefer your news to be more realtime, follow the #dartlang hashtag on Google+ and Twitter.
 
Can I run Dart applications in browsers apart from Chrome?

Of course!  Dart is designed to be converted to JavaScript.  One of the added benefits of compiling to JavaScript over using native JavaScript libraries is that Dart's compiler performs "treeshaking", where your code is analyzed, and any code imported from third party libraries that you don't ever execute is removed from the output.  This means that you only ever deploy the JavaScript that you will actually execute.  Support for running Dart apps from other browsers such as Firefox, Safari and IE is built right into the Dart Editor.  Launch a Dart app in one of these browsers and it will convert your Dart to JavaScript on the fly.

Published at DZone with permission of its author, Eric Genesky.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)