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.
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.
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.
- An HTML library that works transparently on modern browsers.
- 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.
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
- 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!
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.
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.
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.
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.