small medium large xlarge

Dart for Hipsters


Cover image for Dart for Hipsters
Pages 144
Release P4.0 (2014-01-21)
ISBN 978-1-93778-503-1

Psst! You’re not stuck with JavaScript anymore. Dart for Hipsters teaches you the fastest way possible: with real code and real projects starting on page 1. The unabashed goal of Dart is to make programming for the Web simpler, faster, and more powerful. And Dart for Hipsters is the fast-paced, most thorough way to learn it. You’ll explore the ins and outs of Dart by writing a simple application that grows in complexity from modest beginnings to a separate library that fully leverages the power of Dart. Caution: after reading you may develop an intense attachment to structured code and skinny jeans.

Dart 1.1 has arrived and Dart for Hipsters has you covered! Every chapter has been painstakingly reviewed and updated to work with the latest version of this exciting new language. But don’t worry, the book still retains the quick dive approach to writing useful code starting on page 1. It also continues to explore the language by refactoring an application to make the most effective use of Dart’s myriad of features: OOP, real libraries and packages, testing, and so much more! Along the way, we’ll cover everything you need to know about writing beautiful, maintainable application code that just works™ in all modern browsers.

About This Title

In Dart for Hipsters, you follow project-based chapters demonstrating real-world problems solved with Dart. Each project serves as the foundation for deeper discussion of defining features of Dart, such as its support for functional programming. As you reinforce your understanding of Dart, you’ll move on to more complex projects which, in turn, spur more complex discussions, such as how to maintain Dart and JavaScript side-by-side. By the end of this book, not only will you have a thorough introduction to the language, but you’ll also have built an entire MVC library from scratch.

Since Dart aims to be familiar, you won’t see the usual “Hello, World.” Instead, you jump right in by writing an Ajax-powered application, followed by a more detailed discussion of Dart’s basic types. Along the way, Dart for Hipsters shows you how to compile Dart into JavaScript, how to use Dart’s simple object-oriented programming approach, and how to build well-factored, easily used and maintained libraries. You’ll see dynamic features of the language in action, such as injecting different data syncing behaviors for an entire framework with one line of code. Best of all, you’ll learn how Dart makes working with HTML5 and similar technologies a breeze.

What You Need:

You will need Dartium, a preview release of Chrome with the Dart VM built-in. For some of the examples, you need either the dart2js tool or the Dart Editor to compile Dart down into JavaScript.

You Might Also Like

  • Cover Image For The Definitive ANTLR 4 Reference…
  • Cover Image For Hands-on Backbone.js…
  • Cover Image For Scalable and Modular Architecture for CSS…
  • Cover Image For Pragmatic Guide to Sass…


Each of our books has its own dedicated discussion area, where readers help each other out. Many authors also choose to drop by.

Join in…

Here are some recent topics:

Contents & Extracts

Full Table of Contents
  • Getting Started
  • Effective Coding Techniques
    • Project: MVC in Dart
    • Classes and Objects
    • Events
  • Code Organization
    • Project: Extracting Libraries
    • Libraries
  • Maintainability
    • Project: Varying Behavior
    • Testing Dart
  • The Next Level with Dart
    • Project: An End to Callback Hell
    • Futures and Isolates
    • HTML5 and Dart

Brought to You By

Chris fancies himself a relentless public learner, with more than 1,000 blog posts serving as his research notes for his books. He has more than 10 years experience programming in Perl, Ruby, JavaScript, or whatever his current obsession happens to be. Chris lives in Baltimore, MD with his wife, 3 children, and a goldfish named Martin Tanner.