Learning Dart - Second Edition

Learn to develop high performance applications with Dart 1.10

Learning Dart - Second Edition

This ebook is included in a Mapt subscription
Ivo Balbaert, Dzenan Ridjanovic

1 customer reviews
Learn to develop high performance applications with Dart 1.10
$10.00
$44.99
RRP $35.99
RRP $44.99
eBook
Print + eBook
Access every Packt eBook & Video for just $100
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Find Out More
 
Preview in Mapt

Book Details

ISBN 139781785287626
Paperback382 pages

Book Description

Dart is an open source programming language for the web, developed at Google, with a steadily growing community. It is a single language for both client and server, appropriate for the full range of devices on the web – including phones, tablets, laptops, and servers. It encompasses the lessons of the last two decades of web programming.

This book will give you a thorough overview of Dart, taking you through its ecosystem, syntax, and development principles.

With this book, you will build web games using HTML5, audio, and video, and also dive into processing and displaying data in HTML5 forms with Dart. You will also learn how web components fit together with HTML5, and how to apply them in business web applications of the future. You will discover how to store data on the client, communicate data between client and server with JSON, and store JSON data with MongoDB and MySQL.

Stop solving new challenges with the same old tools – let Dart show you a whole new way.

Table of Contents

Chapter 1: 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 to-do list with Dart
Summary
Chapter 2: 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
Using enums
Recognizing and catching errors and exceptions
Summary
Chapter 3: Structuring Code with Classes and Libraries
A touch of class – how to use classes and objects
Summary
Chapter 4: Modeling Web Applications with Model Concepts and Dartlero
A short introduction to Git and GitHub
What is a model 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
Chapter 5: Handling 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
Chapter 6: 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 a local storage
Spiral 4 – reading and showing data
Spiral 5 – changing and updating data
Spiral 6 – working with a list of bank accounts
Summary
Chapter 7: 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
The Collision Clones game
Adding video to a web page
Summary
Chapter 8: 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 web_links project
Using Polymer for the category links project
Applying web components to the project tasks app
Summary
Chapter 9: Modeling More Complex Applications with dartling
The dartling domain modeling framework
Design of the Travel Impressions model in spirals
Generating the 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
Chapter 10: Local Data and Client-Server Communication
The options for browser storage
Asynchronous calls and Future objects
Using IndexedDB with Dart
Using Lawndart
A Dart web server
Using JSON web services
Summary
Chapter 11: 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
Running a Dart server on an App Engine Managed VM
Summary

What You Will Learn

  • Structure your code using functions, classes, generics, packages and libraries
  • Use the power of modern browsers to process and store data
  • Make games by drawing, and using audio and video in the browser
  • Develop an application with a model-driven and spiral-paced approach
  • Discover the Observatory tools for profiling memory and CPU usage of Dart programs
  • Store your app's data in MySQL and MongoDB through Dart
  • Build powerful HTML5 forms, validate and store data in local storage, and use web components to build your own user interface
  • Run your Dart server on an App Engine Managed VM

Authors

Table of Contents

Chapter 1: 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 to-do list with Dart
Summary
Chapter 2: 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
Using enums
Recognizing and catching errors and exceptions
Summary
Chapter 3: Structuring Code with Classes and Libraries
A touch of class – how to use classes and objects
Summary
Chapter 4: Modeling Web Applications with Model Concepts and Dartlero
A short introduction to Git and GitHub
What is a model 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
Chapter 5: Handling 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
Chapter 6: 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 a local storage
Spiral 4 – reading and showing data
Spiral 5 – changing and updating data
Spiral 6 – working with a list of bank accounts
Summary
Chapter 7: 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
The Collision Clones game
Adding video to a web page
Summary
Chapter 8: 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 web_links project
Using Polymer for the category links project
Applying web components to the project tasks app
Summary
Chapter 9: Modeling More Complex Applications with dartling
The dartling domain modeling framework
Design of the Travel Impressions model in spirals
Generating the 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
Chapter 10: Local Data and Client-Server Communication
The options for browser storage
Asynchronous calls and Future objects
Using IndexedDB with Dart
Using Lawndart
A Dart web server
Using JSON web services
Summary
Chapter 11: 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
Running a Dart server on an App Engine Managed VM
Summary

Book Details

ISBN 139781785287626
Paperback382 pages
Read More
From 1 reviews

Read More Reviews