Part 4. Server-side Dart
In the last part of the book, you’ll learn about building Dart on the server. Being able to use code in both the browser and the server can provide productivity boosts by reducing the amount of code you need to write and test.
Chapter 13 starts by showing how you can write simple server-side scripts that you can run from the command line. By running command-line Dart scripts, you’ll learn how to use server-side APIs to access files and folders, and you’ll see how to serve HTTP data to clients.
Chapter 14 picks up on serving HTTP data to serve and communicate with the client-side app from part 3 of the book. You’ll learn how to use web sockets to provide two-way communication between the client and the server, sharing Dart code on both sides of the app. Chapter 14 also shows how you can use a server-side database to persist data sent from the browser client.
In the last chapter, chapter 15, you’ll see how to use Dart’s Isolate technology to achieve concurrency. Isolates let you use multiple processes running in the Dart virtual machine, similar to multithreading in server-side languages, but using a simpler message-passing mechanism. You’ll also see how you can use Dart’s Isolate architecture to load and run Dart code dynamically from a running Dart app, which is useful for developing plug-in architectures.