Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 11. Local Data and Client-Server Communication

Data goes around in applications, but, eventually, new and modified data has to be stored; this can be done on the client or server. In the previous chapters, we used local storage (also called web storage) in the browser. Here, we will investigate a better client-side storage mechanism called IndexedDB and a layer called Lawndart that automatically chooses the best local storage mechanism available on the client. Most of the time, the data needs to be available to many people, so it needs to be stored centrally on a server. We will see how to communicate data between client and server with JSON, and, in the next chapter, how to store this data in a database on the server side. Then, we'll see that Dart can be used for both sides of a client-server app. To do this, we need to learn how Dart works with asynchronous calls using Futures, and how it can run as a web server. The following are the topics for this chapter:

  • What are the options...