PacktLib: Learning Dart

Learning Dart

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Dart – A Modern Web Programming Language

What is Dart?

Dart is a perfect fit for HTML5

Getting started with Dart

Getting a view on the Dart tool chain

A bird's eye view on Dart

Making a todo list with Dart

Summary

Getting to Work with Dart

Variables – to type or not to type

Built-in types and their methods

Documenting your programs

Changing the execution flow of a program

Using functions in Dart

Recognizing and catching errors and exceptions

Summary

Structuring Code with Classes and Libraries

A touch of class – how to use classes and objects

Summary

Modeling Web Applications with Model Concepts and Dartlero

A short introduction to Git and GitHub

What a model is and why we need it in programming

Model concepts – a graphical design tool for our models

Dartlero – a simple domain model framework

An example of using Dartlero

The categories and links application

Summary

Handling the DOM in a New Way

Finding elements and changing their attributes

Creating and removing elements

Handling events

Manipulating the style of page elements

Animating a game

Summary

Combining HTML5 Forms with Dart

Spiral 1 – the power of HTML5 forms

Spiral 2 – how to validate data with Dart

Spiral 3 – how to store data in local storage

Spiral 4 – reading and showing data

Spiral 5 – changing and updating data

Spiral 6 – working with a list of bank accounts

Summary

Building Games with HTML5 and Dart

The model for the memory game

Spiral 1 – drawing the board

Spiral 2 – drawing cells

Spiral 3 – coloring the cells

Spiral 4 – implementing the rules

Spiral 5 – game logic (bringing in the time element)

Spiral 6 – some finishing touches

Spiral 7 – using images

Adding audio to a web page

Using an audio library – Collision clones

Adding video to a web page

Summary

Developing Business Applications with Polymer Web Components

How web components change web development

Web components with Polymer.dart

Two-way data binding in Polymer.dart

Creating the polymer_links project

Using Polymer for the category links project

Applying web components to the project tasks app

Summary

Modeling More Complex Applications with Dartling

The Dartling domain modeling framework

Design of the Travel Impressions model in spirals

Generating Travel Impressions code from the model

Initializing the Travel Impressions model with Data

Testing the Travel Impressions model

Defining and using the MVC pattern

The TodoMVC app

Summary

MVC Web and UI Frameworks in Dart – An Overview

DQuery

Bootjack

Dart Web Toolkit (DWT)

Dart widgets

Bee

HTML components

Rikulo UI

Hipster-mvc

Puremvc

StageXL

Flash Professional CC – toolkit for Dart

Angular.dart

Summary

Local Data and Client-Server Communication

The options for browser storage

Asynchronous calls and Futures

Using IndexedDB with Dart

Using Lawndart

A Dart web server

Using JSON web services

Summary

Data-driven Web Applications with MySQL and MongoDB

Database drivers for Dart

Storing todo data in MySQL

Dartlero tasks – a many-to-many model in MySQL

MongoDB – a NoSQL database

Using the mongo_dart driver to store the todo data in MongoDB

Summary

Index