dark mode light mode Search Menu
Search

Dart

Dart

Initially developed by Google, the Dart programming language is now under development as an open source project standardized through the ECMA standards group. Software applications for the web, server, mobile, and Internet of Things (IoT) can be built with Dart.

When first presented by Google, many developers had concerns about yet another language for the web to complicate how web applications are created. Because many web applications are built with JavaScript, developers also were concerned Dart might replace JavaScript without being an improvement.

However, in addition to other functionality, Dart has evolved into a programming language that compiles to JavaScript code. This allows the Dart language to provide benefits that might not be available in other languages with the certainty the result can run in modern web browsers.

What Makes Dart Special?

Perhaps the most interesting part of the Dart language is its relationship to a larger Google project, also called Dart, which tries to solve programming problems beyond web applications.

For example, the project wants to improve the Document Object Model (DOM), the tree structure made of all parts of a web page that programmers use to add or modify content on web pages. Dart also is designed for high performance and ease of use. And it can be used for mobile and Internet of Things applications.

The language also uses C style syntax which makes it relatively easy for programmers to learn if they know C, C++, C#, Java, and other languages with similar syntax rules.

Here’s an example of Dart code to show how it uses C syntax with curly braces and semi-colons to print Hello World!:

void main() {
    print(‘Hello World!’);
}

Dart uses snapshots to handle out of memory conditions and memory constraints found on mobile hardware so the language can be used on web servers and mobile clients, like JavaScript. Embedded systems used in the Internet of Things (IoT) devices also have constrained memory requirements. To execute multiple computations at the same time, Dart also uses a single isolate — a dedicated chunk or heap of memory — to avoid conflicts and ensure reliability. Isolates communicate through messages which are copied before being sent to another isolate, also adding to reliability.

Dart streamlines a number of small but useful aspects of programming, making it easier to use objects and reduce the amount of written code. When compiled to JavaScript, for example, unused code is shaken out and ignored when creating code for an application. Parameters also can be named to help clarify the meaning of values being passed. And Dart lets you set up a stream instead of having to use repeated callbacks to capture messages and input, for example, clicks on a web page.

The Dart community also has created a simple but thorough online presence for tutorials, code examples, and other learning materials. The DartPad, for example, makes it easy to try the language and practice.

How is Dart Used?

Dart is primarily used for applications that work across a number of environments, for example, web servers and clients, mobile devices, and intelligent objects used in IoT projects where memory usage is limited. Large companies, startups, and companies in between those extremes use Dart to create a variety of applications. The list of who uses Dart, on their site, shows a wide range of often mundane but important uses for the language, a sign the language is productive, adaptable, and not over-built.

Learn More

Dart

https://www.dartlang.org/
https://www.dartlang.org/community/who-uses-dart.html
https://www.dartlang.org/support/faq.html
https://www.dartlang.org/dart-by-example/
https://www.dartlang.org/samples/
https://www.dartlang.org/support/
https://www.dartlang.org/codelabs/darrrt/
https://www.dartlang.org/docs/dart-up-and-running/ch02.html
https://www.dartlang.org/docs/dart-up-and-running/ch03.html
https://www.dartlang.org/docs/
http://stackoverflow.com/questions/tagged/dart
https://plus.google.com/+dartlang/posts
https://twitter.com/dart_lang

DartPad

https://dartpad.dartlang.org/

Dart on Mobile

https://www.dartlang.org/mobile/

Flutter (Dart on Mobile, begun as Sky)

https://www.youtube.com/watch?v=PnIWl33YMwA
https://github.com/flutter/engine
http://flutter.io/
http://arstechnica.com/gadgets/2015/05/googles-dart-language-on-android-aims-for-java-free-120-fps-apps/

Fletch (Dart on Mobile)

https://www.youtube.com/watch?v=Hx2iGEAvZRk
https://github.com/dart-lang/fletch

Polymer Dart

https://github.com/dart-lang/polymer-dart/wiki

Related Posts