Before you begin
This class uses a Xamarin.Forms application to demonstrate caching and synchronization. It supports iOS, Android and UWP. Please select the environment that is easiest for you to work on. To complete the coding exercises, you will need a Xamarin development environment with either a simulator/emulator that supports disabling the network, or a physical device to run the exercise on. Ideally you will be using the emulators to perform the work. Please read the setup requirements if you need help installing the Xamarin development environment.
This class also includes a server-side component written in ASP.NET MVC using WebApi. You will not be editing this project during the exercises, but you may want to refer to it later. In order to run or modify the ASP.NET project you will need a Windows machine running Visual Studio 2017 or greater with a connected Microsoft SQL Server. We have uploaded an instance of the ASP.NET MVC site to Azure and the location is already configured within the lab exercise.
Overview
This class shows how to implement data centric mobile applications that will still work even when the application is offline. You will learn to cache data online for later online viewing and also how to implement apps that can create and edit data while offline and then synchronise the data so the view of the remote and local data are consistent.
Objectives
- Determining your connectivity strategy
- Caching results from a server
- Synchronizing to a remote server
- Evaluating data sync tools
Lecture
ENT410 - Data Caching and Synchronization.
Exercises
Exercise materials are available from GitHub. The code can be cloned through a desktop Git client or downloaded directly as a ZIP file.
-
Caching Data from a remote serviceExercise
In this exercise, we will connect to a remote service, cache its data locally and use that cached data to display the information when your application is offline. -
A coded offline synchronization mechanismDemonstration
The demo code used by the instructor is available in the Demos folder of your copy of the cloned or downloaded course materials.
Additional resources
In this class we will be creating mobile apps that take advantage of offline capabilities, here are some additional tips on working with the technology pieces you may need if you are not already familiar with them.
ASP.NETMobile Plug-ins
Blog Posts
Oracle MCS
IBM MobileFirst