Skip to main content

Posts

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

How Google Uses Angular 2 with Dart

Cross-post from the Angular blog. Google is always busy building new web apps, and recently a lot of that development is using Angular 2 for Dart . Just last week, the Google Fiber team launched Google’s first production Angular 2 app, written in Dart. Take a look at their just-launched Angular 2 for Dart app: The Fiber team has lots of company within Google—Angular 2 for Dart is being quickly adopted by many other Google teams. Dart is an open-source development platform from Google that makes web and mobile development more productive. The Dart language is a concise yet expressive language that’s familiar to developers coming from Java, C#, ActionScript, and JavaScript. The Dart platform gives you an instant edit-debug cycle, great core libraries, a canonical package manager, a powerful semantic analyzer, and IDE support via IntelliJ IDEA and WebStorm. You can run Dart code compiled to JavaScript on all modern browsers. We’ve worked closely with the Angular team as...

Dart 1.13 brings improved JavaScript interoperability and more

Dart 1.13 is now available . With this release, you can more easily access JavaScript APIs from Dart code. We've also improved secure networking on the server. Easier JavaScript interoperability Dart 1.13 provides a new syntax for creating Dart API facades for existing JavaScript libraries. Facades have the benefits you expect from a Dart library: errors, warnings, and code navigation. They also provide the Dart-to-JavaScript compiler the structure needed to provide interoperability with low code size and runtime cost. Example facade for Chart.js library Use the js package to create Dart APIs for your favorite JavaScript libraries. We have an example port of the Chart.js library if you'd like to see how to use these new features in your code. Graph generated with Chart.js and Dart We're actively working on tools to generate JS facades from other typed-JavaScript implementations. To track progress, subscribe to this GitHub issue . Improved secure netwo...

Highlights from the TC52 meeting on September 21, 2015

Last month we had the 9th TC52 meeting where we discussed a number of additional language features for Dart. Below is a list of the main features discussed - most noticeably the lifting of restrictions on mixins. DEP update There is a rich supply of Dart Enhancement Proposals under consideration, and we spent some time discussing the underlying ideas and motivations for several DEPs. Language extensions and modifications under consideration Several language extensions and modifications are currently being considered in more concrete terms. Generic methods This is the most complicated DEP, in particular with respect to reification of the type arguments and other typing issues. Since the previous meeting work has been conducted on prototyping features relating to this DEP, and the impact on libraries has been explored. Among the big concerns are compatibility and implementation efforts. This might not materialize before 2016. Constant context, constant functions One DEP is ...

Dart adopts BoringSSL

Starting today, with the 1.13.0-dev.1.0 release of the Dart SDK, the Dart VM has upgraded its TLS/SSL implementation to BoringSSL . The BoringSSL library is a fork of OpenSSL that’s created and maintained by Google. Dart developers now have the same implementation of SSL as Chromium and Chrome. The new implementation includes some breaking changes to the SecureSocket class and related classes. Dart programs that create secure servers will need to provide their server certificate chain and private key in a new, and easier, way. We encourage you to try the dev channel build of Dart SDK and the new configurations for BoringSSL. You can learn more about Dart and TLS/SSL , and we look forward to your feedback . --- Bill Hesse, feeling more secure

Dart 1.12 Released, with Null-Aware Operators and more

Dart 1.12.0 is now released ! It contains the new null-aware operators language feature, and enhancements to pub, Observatory, dartdoc, and much more. Null-aware operators The new null-aware operators help you reduce the amount of code required to work with references that are potentially null. This feature is a collection of syntactic sugar for traversing (potentially null) object calls, conditionally setting a variable, and evaluating two (potentially null) expressions. Click or tap the red Run button below to see them in action. ??   if null operator. `expr1 ?? expr2` evaluates to `expr1` if not `null`, otherwise `expr2`. ??=   null-aware assignment. `v ??= expr` causes `v` to be assigned `expr` only if `v` is `null`. x?.p   null-aware access. `x?.p` evaluates to `x.p` if `x` is not `null`, otherwise evaluates to `null`. x?.m()      null-aware method invocation. `x?.m()` invokes `m` only if `x` is not `null`. Learn more ...

A New Way to Share with DartPad

Back in May, we announced the release of DartPad 1.0 , a clean and zero-install tool that helps you explore Dart . To create a seamless learning experience for both experienced and new developers, today we released embeddable pads! You can now add live Dart code to web pages. Embeddable pads have the full power of the standalone DartPad: Tutorials and guides can use embeddings to quickly demonstrate concepts on the fly: You can also open embedded pads in DartPad to further edit and share code. For more information, view the embedding guide . Head over to dartpad.dartlang.org and share your first pad! We hope you enjoy this new addition and provide us with feedback—remember, sharing is caring! Posted by George He, Chief Sharing Operator

5% smaller output from dart2js

dart2js now produces up to 5% smaller output in the latest dev channel release of the Dart SDK. We measured a 5% reduction on the minified and zipped dart2js output for one of the larger Dart-based apps in Google with source code size around 17MB. While we’ve seen a 5% reduction on a large app, your milage may vary and improvements are expected to increase with the size of your app. This improvement comes on top of a previous 3% reduction since the beginning of this year. The idea behind the latest improvement is quite simple: The symbols that will occur most often in the generated output should be assigned the shortest minified names. So when minifying the code, we rename according to the frequency of each symbol in such a way that a high frequency results in a short name in the output. This new frequency-based namer generally produces smaller output, which is great for deployment. It does however also result in different name allocations and thus “diffing” before/after the c...