Skip to main content

Posts

Showing posts from March, 2015

Live analysis results with WebStorm 10 and Dart

Today, JetBrains announced the new WebStorm 10 release, which includes significant enhancements for the Dart developer. The new version adds live analysis feedback, and fixes many reported issues. We highly recommend that all WebStorm users upgrade, and that new Dart developers who want a full-featured IDE try the new WebStorm 10 release.



WebStorm now provides on-the-fly code analysis results for Dart code, powered by the Dart Analysis server. You can quickly look through the list of warnings and errors in your project in a tool window or see them highlighted right in the editor.



WebStorm can now auto-import new libraries into your Dart code. Simply press Control-Space twice, and you will see a list of all libraries that are available. Select the library you want to use, and WebStorm automatically adds the necessary import statement to the top of the file.

You can use Dart's new async/await and generator features in WebStorm 10. Asynchronous code is now easier to write and underst…

Dart 1.9: The release you’ve been await-ing for

Asynchronous programming is everywhere – user interaction, network access, file I/O. Dart simplifies and enhances these scenarios with the 1.9 release.Today’s release introduces async methods and await expressions built on top of our existing Future API. You can now use familiar control flow features – for/while loops, if blocks, and try/catch – to manage complex asynchronous interactions. These new features are explained thoroughly the Dart Language Asynchrony Support: Phase 1 article. Before Dart’s Future API makes it easier to compose asynchronous operations, but handling conditional cases and errors can still be difficult.After async and await make implementing the same functionality straightforward.We are also introducing generator methods – sync* and async* – that make it easy to lazily generate sequences, eliminating almost all cases where developers need to create custom iterators or manually manage stream creation. For more information, read the Asynchrony Support: Phase 2 arti…

Dart for the Entire Web

We work with many teams, inside and outside of Google, that use Dart every day to build business-critical apps. Their feedback is consistent: they love working with the Dart language, libraries, and tools, and they compile Dart to JavaScript when they deploy to the web.  However, they also tell us they need better integration with JavaScript, and they need an easier way to debug and optimize their apps across all modern browsers. We listened, and today we are announcing a more focused strategy for Dart for the web.

In order to do what's best for our users and the web, and not just Google Chrome, we will focus our web efforts on compiling Dart to JavaScript. We have decided not to integrate the Dart VM into Chrome. Our new web strategy puts us on a path to deliver the features our users need to be more productive building web apps with Dart. It also simplifies the testing and deployment scenarios for our developers, because they can focus on a single way to build, test, and deploy …

Create your own REST API with Dart

We created Dart to help make developers as productive as possible. While we were building Dart Pad (a browser-based app to help developers learn Dart), we didn't want to spend a lot of time writing boilerplate code for serialization or routing in the REST API. We built the RPC package to help make building REST APIs easier, and today we're happy to announce that it is open source and ready for you to use.

You can use the RPC package to automate the data serialization and request routing for your REST API. Exposing a REST API is simple. Annotate your classes and methods with the HTTP methods, URL paths, etc. Here is an example of a simple echo service.


After you configure your HTTP server (see README), your API can now be reached at:

GET http://<server url>:<port>/api/echo/v1/identity/<name>
POST http://<server url>:<port>/api/echo/v1/inverse

Calling your new server API from client code (written in Dart, Java, Go, iOS, Android, C#) is also easy. For …

Announcing Dart Developer Summit Sessions and Registration

We invite you to Register Now to connect with Dart engineers and developers at the first Dart Developer Summit, April 28-29 in San Francisco, California.

Join us for two full days of sessions and breakouts, covering everything from client to server, embedded to mobile. You'll hear from a range of speakers from the Dart team, Googlers using Dart, and the Dart community.
Some of the sessions include: Keynotes from Dart's co-founders and Google AdsDeep dives into new features like async/await and reflectableDart for the Web state of the unionDart for Internet of ThingsCase studies from Trustwave, instill.io, Google Fiber, and WorkivaNot one, but two sessions on Dart for mobileLots more! One of the best reasons to attend the summit is the opportunity to meet our engineers and community. Our breakouts and Birds of a Feather sessions ensure we collaborate and help build the future of Dart together.
We look forward to connecting with you at the summit. Register now to secure your tic…

Highlights from the TC52 meeting on Feb 24, 2015

At the last TC52 meeting on Feb 24, 2015, we discussed a number of additional language features for Dart - including async, tear-offs and null-aware operators.

Update on async Gilad reported that the implementation had, unsurprisingly, exposed some subtleties in the spec that need to be considered.  Some small adjustments in the language specification may follow from this.

The virtual machine now implements the sync* mechanism.  The async* mechanism is coming along.  The dart2js implementation is complete with respect to the feature set, but it still needs to be debugged.

The development of the async features has given rise to some useful insights.  For instance, sync* creates a synchronous generator, handling all the boilerplate for lazy iteration.  However, the documentation of the library classes need an enhanced level of precision in order for this to work well with the language implementation and specification.  The connection arises because the language specification says that …

Beautiful automated code formatting for Dart

I spend a lot of time reviewing Dart code. At Google, we use the Dart style guide, but we humans are poor at consistently following rules. I end up writing a lot of review comments like "put a newline here" and "remove this space". Although we have an automated formatter, dartfmt, to address this problem, I wasn’t happy with its output.

Over the past few months, I spent a bunch of time adding a sophisticated rule engine to the formatter, helping it choose how best to format a chunk of code. There are still improvements to make, but I believe the formatter is now good enough to be run on all of the world's Dart code.

We've been using this version of the formatter internally for a while, and people really like it. Everyone loves that it ends style debates and makes code reviews easier. Today, I'm happy to announce that the new formatter has landed in the dev channel SDK. Using it is as simple as:

$ dartfmt -w <file or directory>

I'd love to have …

Evolving the Dart language with Dart Enhancement Proposals

In July 2014, Ecma published the first version of the Dart language specification. Ecma TC52 continues to release updated versions with new features (for example, async/await). Our developers have asked for more insight into the discussion process, and for a formal way to seed the spec process with proposals. Today, we're happy to announce Dart Enhancement Proposals as the primary way for the Dart team and the larger Dart community to work together to evolve the Dart language and libraries.

To make a great language that can be used to write great programs means we need to work together. The DEP process is how we do that. We want to:
Create an open, collaborative, and inclusive Dart ecosystem.Be responsive to developer needs.Give the community a sense of shared ownership and stewardship.Be transparent about the work leading to Dart language changes.Ensure rationale for changes (or decisions not to change) is clearly communicated.Close the loop and check if stakeholders are happy bef…