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 indexed_db_spirals
project from Chapter 10, Local Data and Client-Server Communication; and two server projects 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 the changes in the model. Both the server projects need to talk to MySQL, so they have the sqljocky: any
dependency in their pubspec.yaml
to import the MySQL driver. However, of course, we also need the database software, so we have to download and install the MySQL Community...