Dart for Web Developers

Lessons about Dart and how to use it on the client side.

Dart is an application programming language that’s easy to learn, easy to scale, and deployable everywhere. Google depends on Dart to make very large apps.

-dartlang.org

Dart's Features

Simply, Dart is a language invented at Google to compete with JavaScript. But, don't think of this as a 'Dart vs JavaScript' thing. Instead, JavaScript is a screwdriver and Dart is a hammer. Different tools in your toolbox.

'Dart is an object-oriented, class defined, single inheritance language using a C-style syntax that transcompiles optionally into JavaScript. It supports interfaces, mixins, abstract classes, reified generics, optional typing, and a sound type system'.

-Wikipedia

Syntactically, you're in good shape if you've ever used TypeScript or Java. In fact, for JS web developers, the biggest road block to overcome is going be using a typed language. You'll also potentially have to get used to Object Oriented Programming, as JavaScript uses a prototypical hierarchy that's fairly unique.

NB: If you've jumped on the ES6 and Beyond train, then much of the syntax of Dart will look awfully familiar.

Dart can compile into JavaScript (but doesn't have to). It can used in the browser or server side.

Perhaps the biggest benefit of choosing Dart to write an app is the built-in tools and abundance of libraries. Common tasks, such as asynchronous programming, are built right in. Many features that are new or not-yet released in JavaScript are available in Dart.

Dart is currently in production at Google Fiber and Goodgle Ads Team (to name a few).

What You'll Learn

  • Setting up a Dart dev environment.
  • The benefits of using a typed language.
  • Productivity using opinionated languages.
  • DOM Manipulation and standard web development in Dart.
  • A look at the best libraries and tools available to Dart Developers.

Tools

There's a nifty tool that's similar to JSFiddle or CodePen, but for Dart called DartPad.

Theres also a special browser called Chromium, made at Google, that runs native Dart code. So it's a bit faster to use with Dart.

Pub -- the package manager similar to npm.