Building further on Spiral s07 from the previous chapter, we will now add the functionality to store our data on the server in a MySQL database. The project is named todo_mysql
and the code can be obtained from https://github.com/dzenanr/todo_mysql.
It contains three subprojects: one for the client, which is the same as the client portion of client_server_db_s07
in the project indexed_db_spirals
from Chapter 11, Local Data and Client-Server Communication, and two server projects, both with MySQL. The server projects are equivalent in functionality: todo_server_mysql
uses MySQL directly and todo_server_dartling_mysql
is built with a task model in Dartling, to show how the database is updated by reacting to changes in the model. Both the server projects need to talk to MySQL, so they have the dependency sqljocky: any
in their pubspec.yaml
, to import the MySQL driver. But, of course, we also need the database software, so download and install the MySQL Community Server...