dart
New Asynchronous APIs for Dart
The latest Dart SDK now provides a cohesive API for asynchronous programming. Some of the new or improved classes in this release include Stream, a sequence of asynchronous events, and Future, a single asynchronous result.
The Stream class is new and delivers on a common developer request for a more unified approach to events. An event can be any Dart object, which makes Streams very flexible. Consumers of a Stream can listen for events, and streams can be piped, transformed, filtered, and more. We are working to apply them across HTML, I/O, isolates, and more. Here is an example of using streams with the HTML library, treating clicks as a stream of events:
query('#button').onClick.listen((e) => submitForm());
Here is an example of streaming the contents of a file. Notice how streams can be transformed.
Dart's Web UI library is ready for testing
Built on Web Components, and inspired by Model Driven Views, Dart's Web UI library is now ready for testing. This early release of Web UI supports dynamic templates, live one-way and two-way data binding, and custom DOM elements. Web UI also includes a compiler that makes these features available to all modern browsers today.
Web UI helps you build declarative apps that have cleaner semantics and structure. You can build and use custom elements like
Web UI also automatically keeps the HTML page and data models in sync with one-way and two-way data binding. Simply declare, in the DOM itself, the bindings between Dart objects and page elements and let Web UI take care of the details.
Here is a small snippet from a simple TODO app that shows some of these features, including:
(1) linking to a custom element
(2) declarative event handling
(3) templates and iteration
(4) data binding with a custom element

To see Dart Web UI in action, we've ported the ubiquitous TodoMVC sample app:

Getting started and installing Web UI is easy with pub, the Dart package manager. Simply add the web_ui package to your list of dependencies and run pub install. Once installed, you can even configure Dart Editor to watch for changes and automatically recompile your Web UI apps for quick and easy edit and reload development cycles.
Celebrating Dart’s birthday with the first release of the Dart SDK
A year ago we released a technology preview of Dart, a project that includes a modern language, libraries and tools for building complex web applications. Today, after plowing through thousands of bug reports and feature requests from the web community, a new, more stable and comprehensive version of Dart is now available and ready to use.
With this version of the Dart SDK, we’ve made several improvements and added many features:
- A faster Dart Virtual Machine that on some Octane tests outperforms even V8.
- A new Dart to JavaScript translator that generates fast and compact output.
- An HTML library that works transparently on modern browsers.
- A library to interoperate with JavaScript code.
- An easy to use editor.
- Pub, a new package manager
- Dartium, a Chromium build with native Dart support.
- A server-side I/O library.
- A language specification describing the Dart semantics, including new features.
Over the following months, we will continue to work hard to evolve the SDK, improve Dart’s robustness and performance, and fine-tune the language while maintaining backwards compatibility.

You can download the Dart Editor from dartlang.org. It comes with a copy of the open-source SDK and Dartium. Thanks again for all your feedback - keep it coming.
Register now for the global Dart hackathon
The Dart team invites you to the first global Dart hackathon, a collaboration between the Dart team and the developer community. Sign up and have fun hacking on Dart to build modern client and server side web apps and libraries. Current hackathon locations include:
- North America:
- Silicon Valley, California, USA
- South America:
- São Paulo, Brazil
- Europe and Middle East:
- London, England
- Prague, Czech Republic
- Tel Aviv, Israel
- Asia:
- Bacolod City, Philippines
- Chandigarh, India
- Goa, India
- Karnataka, India
- Manipal, India
- New Delhi, India
- Seoul, Korea
- Tokyo, Japan
Hackathon dates vary by location. Check out the full list for the schedule.
The Dart project is still in technology preview, which means you’ll be hacking on early access code, but that’s all part of the fun. We’re eager to see what you build, and we hope you can make it. Register today!
Tech preview of Chromium with Dart engine now available
Cross posted to the Google Code Blog
An attractive feature of Web programming is a rapid development cycle. Reloading the application after the source code has changed takes a fraction of a second. We want to offer you that same experience when using Dart, and today we’re making Mac and Linux binaries available that integrate the Dart VM into Chromium.
This technology preview allows you to run your Dart programs directly on the Dart VM in Chromium and avoid a separate compilation step. Over time, these programs will take advantage of the VM’s faster performance and lower startup latency.
Dart has been designed from the start to work with the entire modern web, and we’re simultaneously continuing to improve our fast Dart-to-JavaScript compiler. Both the Dart VM and modern JavaScript engines are first-class targets for Dart.
This release of Chromium with Dart VM integration is a technology preview, and should not be used for day-to-day browsing. After more testing and developer feedback, we plan to eventually include the Dart VM in Chrome.
Today’s release of the Chromium + Dart VM integration is another step forward for the open source "batteries included" Dart platform. Our goal is to help you build complex, high performance apps for the modern web, and we encourage you to try Dart and let us know what you think.
Translating JavaScript to Dart
Cross posted to: dartlang.org and the Google Code Blog
It took approximately 2000 years for the original Rosetta Stone to be discovered, which helped translate the Egyptian Hieroglyphs. We couldn’t wait that long to bridge the Dart and JavaScript worlds, so today we are releasing the JavaScript to Dart Synonym app.
Like most web developers, we are familiar, comfortable, and productive with JavaScript. We were curious about Dart, and thanks to a recent Dart hackathon, we had the chance to play with the language and libraries. The problem was, as JavaScript developers, we didn’t know how to map common JavaScript idioms to Dart. Hence the idea for this synonym app was born.
We started with the basics that every JavaScript and jQuery developer knows: variables, arrays, functions, classes, DOM manipulation, and many more. Then, with the help of the Dart team, we recorded the corresponding Dart versions of each idiom. To practice what we learned, we wrote this app with Dart.
We hope our app that maps between JavaScript and Dart eases your introduction to Dart and gives you a sense of where the project is going. We know the team is eager to hear your feedback. Don’t hesitate to join the conversation or file a new issue for either Dart or the Synonym app. And remember, Dart isn’t set in stone, so your feedback counts.
Dart: A language for structured web programming
Cross-posted on the Google Code Blog
Today we are introducing an early preview of Dart, a class-based optionally typed programming language for building web applications. Dart’s design goals are:
- Create a structured yet flexible language for web programming.
- Make Dart feel familiar and natural to programmers and thus easy to learn.
- Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.
Dart targets a wide range of development scenarios: from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent. To support this wide range of projects, Dart has optional types; this means you can start coding without types and add them later as needed. We believe Dart will be great for writing large web applications.
Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser. The Dart VM is not currently integrated in Chrome but we plan to explore this option.
The language comes with a set of basic libraries and tools for checking, compiling, and running Dart code, all of which will evolve further with your participation. We've made the language and preliminary tools available as open source on dartlang.org. Check out the site to give feedback, learn more about Dart, and participate in its development.
We look forward to rapidly evolving Dart into a solid platform for structured web programming.


