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

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

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