How should our app handle a situation where it needs a service that can take some time to return its result, for example, when we have to fetch or store data, read a large file, or need a response from a web service. Obviously, the app can't wait for this to end and the result to arrive (the so called
synchronous way), because this would freeze the screen (and the app) and frustrate users. A responsive web app must be able to call this service and, immediately, continue with what it was doing. Only when the result returns should it react and call some function on the response data. This is called working in an
asynchronous, non-blocking way, and most of the methods in dart:io
for server-side Dart apps work in this way. Developers with a Java or C# background would immediately think of starting another thread to do the additional work, but Dart can't do this; it has to compile to JavaScript, so Dart also works in a single-threaded model that is tightly controlled...
Learning Dart
Learning Dart
Overview of this book
Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Dart – A Modern Web Programming Language
Getting to Work with Dart
Structuring Code with Classes and Libraries
Modeling Web Applications with Model Concepts and Dartlero
Handling the DOM in a New Way
Combining HTML5 Forms with Dart
Building Games with HTML5 and Dart
Developing Business Applications with Polymer Web Components
Modeling More Complex Applications with Dartling
MVC Web and UI Frameworks in Dart – An Overview
Local Data and Client-Server Communication
Data-driven Web Applications with MySQL and MongoDB
Index
Customer Reviews