Xamarin	&	Azure
BFF,	Really?
Benjamin	Tam
Twitter:	@benjamintam
Page
Why?
› My	apps… apart	from	actual	phone	functions
› Productivity
› Google	Maps
› Games
› Social	Media
› Calculator!
/	Copyright	©2015	by	Readify	Limited2
Page
Azure	App	Services
› Mobile	Services	vs	Mobile	App
› Mobile	App	vs	API	App
› Client	SDK
› Storage	(including	Offline	Data	Sync)
› Authentication
› Push	Notifications
› .NET	or	Node.js back-end
/	Copyright	©2015	by	Readify	Limited3
Page
Demo:	Xamarin.Forms Solution
/	Copyright	©2015	by	Readify	Limited4
Page
Demo:	Running	App
/	Copyright	©2015	by	Readify	Limited5
Page
Demo:	App	Service
/	Copyright	©2015	by	Readify	Limited6
Page
Demo:	Mobile	App
/	Copyright	©2015	by	Readify	Limited7
Page
Getting	Started
› Quickstart - Easy	Tables
› Node.js backend	only
› “No	code”	CRUD	API
› Code	is	actually	in	corresponding	.js &	.json files
› Uses	OData	&	SQL	Azure
› Debugging
› Log	Stream
/	Copyright	©2015	by	Readify	Limited8
Page
Offline	Data	Sync
/	Copyright	©2015	by	Readify	Limited9
Page
Network	Connectivity
› Is	there	a	network	connection?
› Wifi
› Cellular
› 2G,	3G,	4G
› Roaming
› What	if	the	network	status	changes	mid-operation?
› Xam.Plugin.Connectivity
/	Copyright	©2015	by	Readify	Limited10
Page
Device	Storage
› Properties	dictionary
› Local	file	storage
› SQLite.Net (*PCL)
/	Copyright	©2015	by	Readify	Limited11
Page
How	Does	Offline	Data	Sync	Work?
› Cache	server	data	locally
› Create/modify	data	locally
› Developer	decides	when to	sync	with	Azure
› Push
› Pull
› Purge
› Implicit	push
/	Copyright	©2015	by	Readify	Limited12
Page
Enabling	Offline	Data	Sync
› Microsoft.Azure.Mobile.Client.SQLiteStore NuGet
› Configuration
› IMobileServiceTable vs	IMobileServiceSyncTable
› Define	the	local	store	and	table(s)
› Operations
› IMobileServiceSyncContext
› IMobileServiceSyncHandler
/	Copyright	©2015	by	Readify	Limited13
Page
Other	Considerations
› Soft	deletions
› Conflict	resolution
› What	to	keep?
› MobileServicePushFailedException
› Performance
› Full	vs	Incremental	Sync
› Collapse	Logic
/	Copyright	©2015	by	Readify	Limited14
Page
Demo:	Offline	Data	Sync
/	Copyright	©2015	by	Readify	Limited15
Page
Thank	You!
Twitter:	@benjamintam
/	Copyright	©2015	by	Readify	Limited16

Xamarin & Azure - BFF, Really?