Dart, the new open source structured web programming language currently in technology preview, is making me excited about web programming again. I'm watching it closely, fully understanding it's extremely early in the game to make any predictions. However, at least I can say I'm hopeful that there's a team out there attacking the very real problem of "not enough complex and full featured web apps" by working on an a language/libraries/VM option for modern web apps.
I am a Java developer in a past life, where I grew to love the rich libraries, composable and modular applications, helpful tools, and refactoring techniques. I am a web developer at heart, with a true love for browser based client side web apps. This dichotomy was a bit of an uneasy fit, as part of me wanted a language with more structure (enabling tooling and modularity), and the other part of me wanted the insanely quick iterations of web development and the native-to-the-browser experience.
Dart really strikes a chord with me as it seems like it can be a development environment that answers to both desires: structured development and web development. I can build modular, structured web apps which are assisted by tools while still targeting the browser for modern web apps.
Just the pure fact that I can refactor my web app is enough to get me to pay attention.
How does Dart help?
Dart is a class based, single inheritance, language with interfaces and libraries. You can build a structured web app and compose it in a standard and well defined way. Most of those patterns and practices you learned in other class based languages are available to you. Perhaps best of all, the libraries built by one developer are accessible to another developer in a standard way. It's important to point out that classes are essentially optional, as Dart supports bare functions.
Dart is single threaded, but supports concurrency through isolates. This means Dart avoids the complexity of multi-threaded languages, yet can take advantage of ever prevalent multiple core machines. Isolates are inspired by Erlang actors.
Dart can start fast, due to snapshots. A Dart app's heap can be snapshotted and sent over the wire, significantly reducing application startup time. A browser, for instance, doesn't have to re-parse the application's code on page reload or startup.
Dart is novel, introduces fun concepts like "classes are interfaces", isolate based concurrency, named constructors, factory constructors, and of course optional types.
Dart fixes the DOM with a Dart friendly DOM library that feels natural and refreshing. The Dart team has created a new HTML library for adding events, finding elements, adding elements, that takes advantage of Dart's syntax.
How to get started
Dart is currently (as of 2011-11) in "technology preview", but you can play with it today. I recommend these steps:
- Read the Technical Overview
- Download the Dart Editor
- Read about the new DOM libraries for Dart
- Write some sample code
- Send feedback to the mailing list
- Subscribe to the News and Updates Atom feed and follow @dart_lang
- Write more code
- Send more feedback
As a software engineer with exposure to many different languages and environments, Dart seems to hit a sweet spot for me. Dart is what I want to build my modern, structured web applications: a class based, single inheritance language with interfaces, optional typing, just enough sugar, and isolates based concurrency. Dart is a "batteries included" effort, aiming to deliver a language, libraries, editor, and virtual machine. Dart's ultimate goal is to help modern web developers more productive and deliver bigger and better web applications.
I am excited because Dart is an effort to make "programming in the large" easier for both structured and unstructured developers across the entire web. Anything that tries to make the modern web compelling for modern apps is exciting to me.
If you are interested in building modern web apps for modern browsers, and are looking for a more structured "batteries included" ecosystem, now is the time to look at Dart. It's early in the game, so your feedback has the chance to make an impact. Here's how you get started:
- The official Dart website - hosting the library reference, language spec, articles, etc
- The Dart editor - start with this tool
- Dart articles - good for getting perspective
- Dart presentations - slides from talks and presentations
- Transcript of a Quick Tour of Dart - talk by Gilad Bracha
- Dart Watch - Dart blog
- Dart News - G+ stream of all things Dart
- Dartboard - try writing Dart code in the browser, no downloads required!
- Dart Mailing List - general Dart discussion. Post your feedback here.