contents


foreword
preface
acknowledgments
about this book
about the cover illustration

Part 1 Introducing Dart

1 Hello Dart
1.1 What is Dart?
1.2 A look at the Dart language
1.3 Web programming with Dart
1.4 The Dart tool ecosystem
1.5 Summary
2 “Hello World” with Dart tools
2.1 The command-line Dart VM
2.2 “Hello World” with the Dart Editor
2.3 Importing libraries to update the browser UI
2.4 Summary
3 Building and testing your own Dart app
3.1 Building a UI with dart:html
3.2 Building interactivity with browser events
3.3 Wrapping structure and functionality with classes
3.4 Unit-testing the code
3.5 Summary

Part 2 Core Dart

4 Functional first-class functions and closures
4.1 Examining Dart functions
4.2 Using first-class functions
4.3 Closures
4.4 Summary
5 Understanding libraries and privacy
5.1 Defining and importing libraries in your code
5.2 Hiding functionality with library privacy
5.3 Organizing library source code
5.4 Packaging your libraries
5.5 Scripts are runnable libraries
5.6 Summary
6 Constructing classes and interfaces
6.1 Defining a simple class
6.2 Constructing classes and interfaces
6.3 Creating constant classes with final, unchanging variables
6.4 Summary
7 Extending classes and interfaces
7.1 Extending classes with inheritance
7.2 Everything is an object
7.3 Introducing the dynamic type
7.4 Summary
8 Collections of richer classes
8.1 Working with collections of data
8.2 Building your own generic classes
8.3 Operator overloading
8.3 Summary
9 Asynchronous programming with callbacks and futures
9.1 Why web apps should be asynchronous
9.2 Using callbacks with async programming
9.3 Introducing the Future and Completer pair
9.4 Unit-testing async APIs
9.5 Summary

Part 3 Client-side Dart apps

10 Building a Dart web app
10.1 A single-page web app design
10.2 Building a UI with dart:html
10.3 Handling browser events with dart:html
10.4 Summary
11 Navigating offline data
11.1 Integrating navigation with the browser
11.2 Using browser cookies to enhance user experience
11.3 Persisting data offline with Web Storage
11.4 Summary
12 Communicating with other systems and languages
12.1 Communicating with JavaScript
12.2 Communicating with external servers
12.3 Building installable, server-less browser apps
12.4 Summary

Part 4 Server-side Dart

13 Server interaction with files and HTTP
13.1 Running server-side Dart scripts
13.2 Serving browser HTTP requests
13.3 Serving clients with a RESTful API
13.4 Summary
14 Sending, syncing, and storing data
14.1 Serving DartExpense from the server
14.2 Using web sockets for two-way communication
14.3 Storing data with HttpClient and CouchDB
14.4 Summary
15 Concurrency with isolates
15.1 Using isolates as units of work
15.2 Loading code dynamically
15.3 Spawning multiple workers
15.4 Summary

 
appendix A Core language reference
appendix B Defining classes and libraries
index