Who Turned Off the Lights? Azure Offline Editing and Syncing

Who Turned Off the Lights? Azure Offline Editing and Syncing

We spent the last post cloud gazing and exploring the Azure Mobile Services API as it relates to creating and retrieving data from a Xamarin mobile app. But we were limited to accessing our data only when connected to the internet. What happens when the skies turn dark, a storm rolls in and we lose internet connectivity? Or, in our case with the Cheesed app we are developing, our users are deep in a cheese cave sampling a rare 20 year cheddar and their mobile device cannot reach the internet? Do we just display an error message saying, “stop eating cheese … no internet, try again later”? And not let them enter a rating or any notes on the complexities of the cheese? That’s not acceptable! How can we expect somebody to use an app, but only when they are online? Lucky for us, Azure Mobile Services provides offline capabilities! So let’s dig in and see what it’s all about. Benefits of Working Offline Being able to edit data anytime is only one benefit that the offline capabilities that Azure Mobile Services gives us. Other benefits include: Resiliency against network outages (we’ll have a data cache that will always be there). Improves the (perceived) performance of the app – if we design it right, we can have the data already downloaded and onboard the device before the user needs it. Detect conflicts when the same record modified on more than one device and then sync’d/pushed to the cloud. We’ll talk about how to handle conflicts in the next post – but for now let’s dig into how to make...
Head in the Clouds – Azure Mobile Services and Data

Head in the Clouds – Azure Mobile Services and Data

As we continue down the path of looking at cross platform data options, let’s reminisce of where we came from… First we argued with a hipster about whether storing data in SQLite was good or not… Then we got down and dirty with some cold hard data caching… Finally we explored the awesomeness of Akavache… Now our gaze turns towards the sky … if we can save data locally … and download data and store it for later use … why can’t we take our data and push it to the cloud? We’re going to do that and a whole lot more! Over the series of the next couple of posts we’re going to build out a fully functional application with Xamarin Forms that utilizes everything we learned from the previous posts on SQLite, caching and Akavache. We’ll then combine all that knowledge with what we’ll learn in this set of upcoming posts on Azure Mobile Services and Storage. We’ll cover the basics of uploading data to and retrieving data from Azure, handling offline edits and synchronization, what to do when there are conflicts, and also how to load BLOBs to the cloud – something that wasn’t possible from a PCL based Xamarin app until just recently (introduced at Build 2015). What kind of app are we going to build that needs to do all of that? Well, I’m from Wisconsin … and there are only 3 things we think about in Wisconsin … the Packers, beer and cheese. Don’t tell anybody, but I’m not a Packers fan, so no Packers app. If we start doing something with beer,...