Friday, November 7, 2014

Running Dart server applications on Google Cloud Platform

Today you can develop and deploy Dart server applications that run on the Google App Engine Managed VMs beta.

The productivity of the Dart language and libraries are a great fit for server applications. You get the competitive performance of the Dart VM while leveraging powerful tools like Observatory–all while easily sharing code with your browser application.

Now you can try Dart on Google App Engine, which lets you build and run applications on Google’s infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs change. With App Engine, there are no servers for you to maintain. You simply upload your application and it’s ready to go.

Managed VMs extend App Engine to support user-defined custom runtimes. The Dart team is building on custom runtimes to allow you to easily develop and deploy Dart server applications that run on Google’s infrastructure.

Once you have set up your local development environment, you can quickly write and test your Dart server application using simulated App Engine Services–Datastore, Memcache, Logging, and more–on your development machine. A local admin interface gives you direct access to the services on the running instance. We’ve created several samples to get you started.

When you’re ready to deploy, App Engine gives you control over your application resources. You can also easily configure it to allow your application to automatically scale up and down in response to traffic. Once your site is live, you can monitor and manage your application using the browser-based Google Developers Console.

The Dart packages we are releasing today are beta, so we’d love your feedback. To participate in the discussion on running Dart on Managed VMs, and to stay informed with news and announcements, sign up for the Dart cloud Google Group. We are looking forward to your feedback so we can improve your experience with Dart and Google Cloud Platform.

To get started, visit dartlang.org/cloud.

Wednesday, October 22, 2014

WebStorm 9 released with improved Dart support

Today, JetBrains announced WebStorm 9, an update to their powerful web development editor. Highlights for the Dart developer include: pub serve support, improved isolates debugging, Observatory support, new syntax support, and more.

WebStorm 9 now launches pub serve, Dart's development server, when the developer runs a Dart web app. Pub serve takes care of generating assets, compiling to JavaScript, and more.

Developing and debugging apps that run multiple computations in parallel is now easier, thanks to the new ability to set breakpoints inside of isolates.



For deep insight into your app running on the Dart VM, you can now open the Observatory directly from WebStorm 9. Use the Observatory to learn how memory is used, where CPU time is spent, and more.



It's now easier to debug apps that use collections (which is every app), thanks to the debugger's logical view of maps and lists. Developers now see the logical data structure instead of internal implementation details.



WebStorm 9 now understands syntax for deferred loading and symbols. Deferred loading helps web apps start quickly, by delaying when libraries are loaded. Symbols are used when an identifier needs to remain unmodified after minification.

We encourage you to try WebStorm or IntelliJ IDEA for your Dart development, and we hope you enjoy these new features. We look forward to your feedback.

Wednesday, October 15, 2014

Dart 1.7: easily share and use command-line applications built with Dart


The Dart language, libraries, and runtime make it easy to create command-line applications. In fact, all of the core tools in the Dart SDK – dart2js, pub, and dartanalyzer – are written in Dart. We wanted to allow developers to easily get their own Dart scripts and command-line apps into users' hands. With Dart 1.7, users now have an easy way to install and run scripts built with Dart, making first-class command-line Dart apps a reality.

Developers can specify executables (Dart scripts) in their pub package, which are made available to a user when the package is installed.

Before:

$> git clone https://git.example.com/my_cool_app
$> cd my_cool_app
$> pub install
$> dart bin/my_cool_app.dart

Now:

$> pub global activate my_cool_app
$> my_cool_app

Dart 1.7 also includes improvements to our code isolation models. You can now launch isolates with a different package root than the host application, allowing for composition of Dart applications with different dependencies. For more robust servers and long-running Dart scripts, developers cans now easily handle errors thrown in child zones.

We've also made it easier to install and upgrade Dart SDK and Dartium. We now support Apt on Linux and Homebrew on Mac.

For a summary of these and others changes see the release notes. You can download Dart 1.7 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.

Tuesday, October 14, 2014

Dart plugin for Sublime updated with many new features

Many of our developers enjoy using lightweight text editors, but still want to use features traditionally found in powerful IDEs. Today, in partnership with Guillermo López-Anglada, lead developer of the Dart plugin for Sublime, we are announcing many new features to help Dart developers stay productive in Sublime Text 3.



With the Dart plugin, Sublime understands your Dart code and projects. Dart code is syntax highlighted, with support for the latest language keywords like async/await and deferred. To provide you with feedback on code quality, the plugin displays errors and warnings from static analysis.

You can run web applications, command-line scripts, and servers without leaving Sublime. The Dart plugin starts and manages pub serve, Dart's development server, making it easy to launch your web app into Dartium or any browser.

Pop__Pop__Win__and_Pop__Pop__Win__and_index_html_—_pop_pop_win.png

Integration with various Dart SDK tools is now more complete. Keep your Dart code in sync with the Dart Style Guide with the new Format source code feature. Install new packages and update existing packages with improved pub get/upgrade integration.

Developers building server-side apps with Sublime will want to check out the initial integration with Observatory. You can now use Sublime to easily launch the Observatory tool, which helps you view live memory and performance insights from the Dart VM.

The Dart team is very appreciative of Guillermo's (and the community's) hard work. There's always opportunities for improvements and contributions: improving the documentation, reporting features and issues, and helping integrate Dart's new Analysis Server. If you're interested in contributing, head over to the plugin's GitHub repo.

You can easily install the Dart plugin with Package Control for Sublime, and we hope it makes your Dart experience even better.

Monday, October 13, 2014

Google Elections Launches New App Built with Dart, Polymer

This past weekend, the Google Elections team introduced their Elections Explorer for Brazil: a live, real-time election results experience for the presidential, gubernatorial, senate, and chamber races in Brazil. This is the Google Elections team's second app built with Dart, and their first to use Polymer.



The Google Elections team is happy with their experience. They write:

"We love writing Dart because it's fast, compact, and sane. Great tools and a readable language give us the confidence we need to move quickly. But adding Polymer to the mix is pure gold. After years of writing code for the web, this was the first time I've felt like I'm working with a real platform. We threw away tons of the boilerplate we've built up over time and just focused on the app itself. This was awesome."

Sean Diamond, new to our team this year, said, "Being new to web development, but having done years of UI development on native platforms, writing Polymer with Dart made me feel right at home. This is exactly how UI development should be done."

The Explorer is built with Dart, Polymer, Core Elements and Paper Elements.

Thursday, October 9, 2014

Dart launches support for Homebrew

Developers can now easily install and update Dart SDK and Dartium on Macs with Homebrew, a popular package manager for Mac OS X. Both the stable SDK and (for the more adventurous) the dev channel SDK are available via Homebrew.

It's easy to get started. After you install Homebrew, run these commands to install the stable channel Dart SDK and Dartium:

  brew tap dart-lang/dart
  brew install dart
  brew install dartium # if you build Dart client apps

When there is a new build of the SDK or Dartium, run these commands to stay up to date:

  brew update
  brew upgrade dart
  brew upgrade dartium

Use Homebrew if you build server-side Dart apps, or you are not using Dart Editor (for example, if you use WebStorm or Sublime). To download Dart Editor, you can continue to use the download page.

We hope our support for Homebrew makes it easy for our Mac developers to stay on the latest versions of the Dart SDK. Thanks to the Homebrew developers for answering our questions along the way. We look forward to your feedback.

Monday, September 22, 2014

New Google APIs Client Libraries for Dart help Dart apps use Google services

We are always working on providing new APIs for Dart. If you have been using Google services from Dart, we are happy to say that the Dart Team is now supporting a client library for accessing a set of APIs to Google services.


Most Google services have an API described by the Google Discovery Service. This includes both Apps APIs (such as Gmail and Drive) and Cloud APIs (such as Cloud Datastore and Cloud Storage).

Based on previous work by GDEs Adam Singer and Gerwin Sturm, the Dart Team has built an API generator to create Dart client libraries enabling access to Google services. We recently published the following two packages on pub.dartlang.org:

  googleapis
  googleapis_beta

The googleapis package contains all the APIs that are available in a stable version. The googleapis_beta package contains the APIs that are currently in beta and possible only available through a Limited Preview program. We will be updating these packages on a monthly basis to ensure that they provide access to new services as they become available.

Along with the generated APIs, we have published a googleapis_auth package that handles all the different authorization models supported to access the APIs from different environments. Using googleapis_auth makes it easy to use the client libraries in a standalone application, on a Google Compute Engine instance, or in the browser.

To get started using the libraries, take a look at the GitHub repository googleapis_examples. The examples cover both Dart code that runs in the browser and Dart code that runs as a standalone program, demonstrating how to access Google Drive and Google Cloud Storage.

Please post on our discussion group if you have questions or comments on the client libraries. You can also file bugs on GitHub projects for the generator and the googleapis_auth package.

By Søren Gjesse, Software Engineer on Dart

---
Update (Sep 23, 2014): An article on using Google APIs Client Libraries with Dart has been added.