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 .

Dart 1.18: Laying foundations

Dart 1.18 is now available. Go get it! The team has been focused on implementation details over the last six weeks. The API changes to the SDK are very light – see the CHANGELOG – but we have been working hard laying the foundation for a number of important projects. Improve the development and runtime experience for  Flutter . Improve the speed and stability of Dart Analyzer, especially as it relates to dev_compiler . Work to finalize two language tweaks Initializing formals: https://github.com/dart-lang/sdk/issues/26655 Allow trailing commas: https://github.com/dart-lang/sdk/issues/26644 Download the latest release. Let us know what you think!

AngularDart is going all Dart

Until now, the multiple language flavors of Angular 2 were written as TypeScript source, and then automatically compiled to both JavaScript and Dart. We're happy to announce that we’re splitting the Angular 2 codebase into two flavors – a Dart version and a TypeScript/JavaScript version – and creating a dedicated AngularDart team. This is amazing news for Dart developers because: The framework will feel more like idiomatic Dart. It will make use of Dart features that couldn't work with the TypeScript flavor. It will be faster. This is equally great news for our TypeScript and JavaScript developers, by the way. Cleaner API, performance gains, easier contributions. Read more on the Angular blog. Angular 2 for Dart is used by many teams at Google. Most famously by the AdWords team, but many other Google teams build large, mobile-friendly web apps. Some of the top requests from these teams were: make the API feel like Dart, provide a faster edit-refresh cycle, and ...

Changes at dartlang.org

Today we simplified dartlang.org, making it reflect the current state of the project a little bit better. We have www.dartlang.org for the fundamental Dart technologies—the language itself and the core libraries. And then we have separate websites for the different targets: webdev.dartlang.org for web apps Flutter for iOS & Android native apps Dartino for IoT Dart VM for command-line apps and servers Some other changes we made: Feature the pages that people visit most often. Show the core goals of the project on the homepage. Completely rework the information architecture, from domains down to individual pages and sections. Set up events.dartlang.org for hosting event-related micro-sites. Reimplement the sites to make maintenance easier. More significant changes will come, but we needed to land these changes before going further. If you notice that something's broken or could just be better, please let us know using the relevant issue tracker: www.dar...

Unboxing Packages: path

I want to do something a little different with my blog post this week. When I’ve written about packages in the past, I’ve mostly done a high-level overview of their APIs and how they fit into the Dart ecosystem as a whole. But path is one of the very oldest packages in the ecosystem, and any Dart user who’s written any server-side or command-line apps is probably already familiar with the API. So instead of a high-level overview, I want to do a deep dive. I want to talk about why we made the design decisions we made when writing path , and how we implemented our design effectively and efficiently. This post will be as much about how the package was constructed as it is about what the final product looks like. Initial Design It first became clear that Dart needed a solid solution for path manipulation when Bob Nystrom and I first started working on pub . Paths may seem simple on their face, but there’s a lot of hidden complexity when you need to make them work with all the edge...

Dart 1.17: More performance improvements

Dart 1.17 is now available.  Get it now! We continued the work from 1.16 of working closely with some of our key users at Google to make sure Dart is even more productive for developers. We've additionally optimized how our core tools deal with large applications, and have seen significant improvement over the last two releases. Dartium is now much more stable. We have improved the speed of the Dart Analyzer by more than 200% on large codebases. Last, but not least, Dartium startup time on large applications at Google has improved by a factor of 4. We also made a number of smaller changes to core SDK APIs, please refer to the SDK changelog .

Unboxing Packages: vm_service_client

Three weeks ago , I wrote about the stream_channel package. Two weeks ago , I wrote about the json_rpc_2 package which is built on top of stream_channel . This week I’ll complete the trifecta by writing about the vm_service_client package, which uses json_rpc_2 in turn—and is a really cool package in its own right! One of the lesser-known corners of the Dart VM is its service protocol , but it’s one of its most powerful components. It uses JSON-RPC 2.0 over WebSockets to allow clients to connect to the VM, inspect its internal state, set breakpoints, and all sorts of neat stuff. If you’ve ever used Observatory for debugging or profiling your Dart code, you’ve been using the service protocol under the hood: that’s how the Observatory web app talks to the VM’s internals. Because the protocol is fully documented and based on a standard underlying protocol, it’s possible for anyone to use from their code. And the vm_service_client package makes it downright easy: it provides a Da...

Unboxing Packages: json_rpc_2

Last week I wrote about the stream_channel package for two-way communication, so this week it seemed natural to move to a package that uses it: json_rpc_2 . This is an implementation of the JSON-RPC 2.0 specification, which is a popular protocol for providing structure and standardization to WebSocket APIs. Although it’s most commonly used with WebSockets, the protocol itself is explicitly independent of the underlying transport mechanism. This makes it a great fit for stream channels, which can be used to represent a two-way stream of JSON objects in a way that works with any underlying mechanism. Thanks to stream channels, JSON-RPC 2.0 can be used across WebSockets , isolates , or any channel a user chooses to wrap. Shared APIs There are three main classes in json_rpc_2 : Client makes requests and receives responses, Server handles requests and returns responses, and Peer does both at once. Because all of these involve two-way communication, they all have the same two ...