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 .

An interview with the author of Mastering Dart

Dart is more than just a language. The Dart SDK contains a robust core library (with async classes, collections, reflection and more), HTML bindings, JavaScript interop, a server-side VM, and more. Dart is easy to learn, but when you're ready to "level up", it helps to have an expert guide you through its many features and capabilities. We sat down with author Sergey Akopkokhyants, author of Mastering Dart , to learn more about his book for advanced Dart topics and techniques. Q) On behalf of the Dart team, thanks for writing Mastering Dart! So, how did you discover Dart? Sergey: The first time I heard about Dart was in 2011. I watched a Google conference and found it very interesting how this new language helped in developing web applications in a very familiar fashion with OOP, types and generics. Information was scarce at the time, so I worked to collect it myself bit by bit. Late in 2012, Ray Cromwell introduced the idea of migrating from GWT to Dart. I thi...

Irregexp, the Dart VM's new RegExp implementation

Crafting regular expressions, or regexps, is an art form . They are a powerful way to search through and pattern-match strings. To give our developers faster performance (up to 150X, compared to our previous implementation) and better semantics with their regular expressions, we're happy to announce that we've finished a port of V8's Irregexp engine to the Dart VM. Previously, some regular expressions had incorrect semantics , while others had sluggish performance when run in the Dart VM. These issues are resolved by the new implementation. The behavior of regular expressions are now consistent with dart2js compiled code executed on top of V8. We hope you enjoy these improvements to Dart's regular expressions. Look for the new regular expressions implementation starting with Dart 1.9, which is now in the developer channel . Posted by Jakob Gruber and Ian Zerny , Irregular Software Engineers

Dart Language Evolution Discussed in Ecma TC52

The Dart standards committee (ECMA TC52) met on January 14th, 2015. The committee discussed several areas where the language could be improved and agreed that these should be investigated in more detail, likely leading to detailed proposals over the next few months. Configurable Imports Some libraries only work on the server, or only on the client (in particular, if dart:html has been imported then a server execution is ruled out). There may be added support for some kind of conditional compilation such that different contexts may make different choices about which libraries to import. Another proposal, which is much more complex and powerful, is concerned with parameterized libraries, e.g., libraries that may take type arguments or other libraries as arguments. Erik mentioned that the conditional compilation feature might already be included in the language, based on the ‘part’ mechanism, and Gilad agreed that that would be worth investigating, too. Union Types Union types ...

An interview with the author of Dart for Absolute Beginners

There are many books about the Dart language and libraries , but most assume some knowledge of programming. For people that are brand new to software development and want to learn Dart , there is now  Dart for Absolute Beginners (Apress) . We sat down with author David Kopec, to learn how people can begin their programming journey with Dart. Q) On behalf of the Dart team, thanks for writing Dart for Absolute Beginners! So, how did you discover Dart? David: Working in the startup world, I always try to keep abreast of exciting emerging technologies in the sphere of software development that may ease the lives of developers like myself. I first came across Dart in late 2012 while trying to get a consumer automotive web startup in LA off the ground. Dart was still in its early phases, but I was quickly enamored with its clean design and potential to ease Web development for both professionals and novices alike. I took a mental note and thought — this is something I ...

Enums and Async primitives in Dart

Support for enums, async, and deferred loading are now officially part of the 2nd revision of the Ecma-408 standard , the Dart Programming Language Specification. The second revision was approved last week at the Ecma General Assembly. You can find more information about using the new features in our language tour on dartlang.org: Enumerations ( enum )  Asynchrony ( async , await , and more) Deferred loading ( import ... deferred as ) Enums Enums help developers express clear intent with minimal code, and help tools catch potential bugs. Here is an example of an enumeration of form states:      enum FormState { OPEN, INPROGRESS, CLOSED } Tools can even warn developers if they omit an enum value from a switch statement, which helps identify potential bugs. Async Dart has always had strong support for asynchronous programming, with core library features such as Future and Stream . Now, with the new language primitives async  a...

Dart 1.8: library improvements and experimental support for enums

Would you like to try out Dart’s upcoming support for enums? In Dart Editor under Tools > Preferences > Experimental you can “Enable Enums Support” and start experimenting with code like: With Dart 1.8, a number of library improvements have also landed.  In dart:collection, SplayTree added toSet() method, and in dart:convert a JsonUtf8Encoder class was added.  In dart:core, the following three things were added:  New properties and constructors for RangeError A new IndexError class - used by the RangeError.index constructor Optional start and end arguments for the String.fromCharCodes constructor. In dart:io we added support for the ALPN extension of the TLS secure networking protocol for Client and Server. For a summary of these and others changes see the release notes . You can download Dart 1.8 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 f...

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 envi...