Tuesday, September 16, 2014

Docker images for Dart now available

Developers increasingly want to use the same language and business logic on the client and the server to reduce risk and complexity. To help developers easily build and deploy end-to-end Dart apps, we are happy to announce ready-to-use Docker images for Dart. This expands our Docker usage further beyond the recently announced Docker support in Google App Engine. There are now three Dart-related images on hub.docker.com for you to use: dart, dart-runtime and dart-hello, which uses the same naming scheme as the corresponding Node, Python and Go images already offered.

The image google/dart adds the Dart SDK to google/debian Debian wheezy image. Running Dart in a container is now as simple as this:

  $ docker run -i -t google/dart /usr/bin/dart --version

The image google/dart-runtime inherits from google/dart, and provides a convenient way to run a Dart server application using a one line Dockerfile. To inherit from google/dart-runtime, your server application requires the following layout:

  • has a the pubspec.yaml and pubspec.lock files listing its dependencies.
  • has a file bin/server.dart as the entrypoint script.
  • listens on port 8080

With this layout and a Dockerfile with the following content:

FROM google/dart-runtime

You can run your app in a container as simple as this:

  $ docker build -t my-app .
  $ docker run -d -p 8080:8080 my-app

The last image google/dart-hello is a sample Dart server application, that inherits from dart/runtime. Here is an example of how to run the sample:

  $ docker run -d -p 8080:8080 google/dart-hello

Depending on your local Docker installation the address of the server differs. If you are using boot2docker with the default configuration you can talk to the Dart server in the docker container on http://192.168.59.103:8080:

  $ curl http://192.168.59.103:8080/version

You can choose specific version tags, such as 1.6.0 (recommended), or choose the ‘latest’ tag for the latest stable version. Here is an example of running Dart 1.6 with Docker:

  $ docker run -i -t google/dart:1.6.0 /usr/bin/dart --version

If you haven't already, go and install boot2docker and start building you Dart server application using Docker images. Pushing these images to you server will simplify deployment and ensure you are running the same code on your server as you have been testing locally.

Cross-posted to Google Developers Blog.

By Søren Gjesse, Software Engineer on Dart

Wednesday, August 27, 2014

Dart 1.6 adds support for deferred loading


Dart makes creating complex applications easy, but large code size can negatively affect startup time. Dart 1.6 added support for deferred loading, which allows developers to load libraries only when needed, allowing for quicker load times and a better user experience. The Dart site has an article describing how to use deferred loading in your application.

Dart 1.6 also contains a number improvements which improve the security of server applications. The Uri class is now more strict about malformed data and HttpServer now defaults to sending best-practices headers to help protect your application and your users.

For summary these and others changes see the release notes.

You can download Dart 1.6 from the Download Dart page. If you are running the Dart Editor, you can update by checking "About Dart Editor". Check out the Dart support page for information on getting help, filing issues, contributing to the project.

Friday, July 4, 2014

Ecma approves the 1st edition of the Dart language specification

At its 107th General Assembly last week, Ecma approved the first edition of the Dart language specification. Dart is now an official Ecma standard and the specification is made available as Ecma-408 standard.


We are very happy with the TC52 contributions from the community and the exciting language work on Enums, Deferred Loading and Async lying ahead.

We encourage everyone interested in the evolution of Dart to join Ecma and contribute to the TC52 work. The next meeting will be held on September 16, 2014 in Zürich, Switzerland.

Thursday, June 26, 2014

Dart 1.5 makes it easier to develop for the mobile web


It’s important for web experiences to work great on mobile devices. The latest release of the Dart includes a development version of Dartium – Chrome with the Dart Runtime – which runs on Android devices. We’ve also updated the Dart Editor to support debugging mobile web apps written in Dart. You can set breakpoints and debug exceptions with Dart web apps running on a device with the same development flow that exists on your development machine. Check out the documentation to get started.

The Dart 1.5 release cycle was short – just four weeks – but we are excited to continue delivering great improvements to our platform and tools. You can see a summary of the updates in the release notes.


We have also released an update to the Dart Polymer package and shipped two sets of new Polymer elements. core_elements gives Dart developers access to all Polymers infrastructure components. paper_elements contains Polymer elements that follow the material design pattern that was announced at Google I/O 2014.

You can download Dart 1.5 from the Download Dart page. If you are running the Dart Editor, you can update by checking "About Dart Editor". Check out the Dart support page for information on getting help, filing issues, contributing to the project.

Friday, June 20, 2014

Dart at Google I/O 2014

Google I/O 2014 is right around the corner. This year, we’re thrilled to have more presentations about using Dart than ever before at I/O.


If you’re keen to learn more about what the Dart team and Dart users have in store for you, be sure to either check out the online schedule or install the I/O app. Pick the topic “Dart” and you’ll be taken straight to the many Dart-related events at I/O.

If you’re attending I/O this year, please drop by and say "Hi" at the Dart booth. Many Dart engineers will be at I/O, answering questions and helping you with your apps.

For those of you not able to join us in San Francisco, be sure to tune into the live stream, join a local I/O extended near you, or watch the sessions on the Google Developers YouTube channel. If you can't wait, be sure to subscribe to the Google Developers YouTube channel already now for additional Dart videos produced just for I/O, including previews of some new highly requested features.

Wednesday, May 21, 2014

Dart 1.4 Brings Deep Visibility to Run Applications



It’s much easier to improve something if you can measure it. With Dart SDK 1.4, we are announcing Observatory: a comprehensive set of tools for understanding, measuring, and improving your Dart code.

As the documentation explains:
Observatory allows you to peek inside a running Dart virtual machine (VM) on demand and provides live, immediate reporting of data. You can use it to browse most aspects of an application.

Dart Observatory Screen Shot
The Observatory provides information on garbage collection, the instance count for all in-memory objects by their type, line-by-line code coverage, and even evaluation of arbitrary expressions. It will continue to evolve and improve in future releases. Take a look at the documentation and let us know if you have issues or suggestions.

Dart 1.4 also includes a number of other fixes, additions and improvements, including:
  • The dartanalyzer command line tool is now 100% Dart and runs without Java. Using dartanalyzer directly or via other tools requires only the Dart VM. 
  • File I/O is much faster, especially when accessing large files. 
  • We’ve added experimental support – Linux-only at the moment – for sharing network sockets across isolates
For a the complete summary of changes, read the release notes.

You can download Dart 1.4 from the Download Dart page. If you are running the Dart Editor, you can update by checking "About Dart Editor". Check out the Dart support page for information on getting help, filing issues, contributing to the project.

Thursday, May 8, 2014

Dart support for Internet Explorer

Dart v1.5, scheduled for late June, will be the last Dart release to support Internet Explorer 9. Dart will continue to support the latest releases of Firefox, Chrome, and Safari, as well as the two most recent releases of Internet Explorer – currently IE10 & IE11.

The factors we considered:

  • Most measures show IE9 usage is less than half of IE10 and IE11 combined.
  • The same measures often show IE9 usage trailing IE8.
  • A number of Google properties, including Google Apps, have ended support for IE9.
  • The Polymer project limits support to IE10+.

While we regret the impact to developers who would like to continue to support IE9, we are excited about the improvements this change will allow. For example, releases after Dart v1.5 will be able to use typed arrays across all of our libraries. Typed arrays are a web API for efficient access to raw binary data. Expanded use will help simplify and optimize the Dart SDK and enable developers to build faster and better experiences.

Please post on our discussion group if you have questions about our browser support policy or about our plans for typed arrays.