Accessing roaming data in the cloud by using SkyDrive
Do you want to create an app that can store data in the cloud?
Do you want to access that data from any Windows 8–based device running your app?
Do you want to access cached data when a network connection isn't available?
Then read on….
Let's say you want to create a roaming-data app that enables users to update and manipulate text items on a variety of Windows 8–based devices, like a laptop and a Surface with Windows RT. You want to allow the user to sign in to a SkyDrive account automatically by using Microsoft account credentials. You also want users to be able to perform quick searches by using friendly file names, and to display cached data when the network connection is unavailable. SkyDrive helps you create apps that can do these things.
You may want to download the sample, SkyDrive Roaming Data, or you can read more about it first...
First, a few notes about choosing a cloud technology
SkyDrive is just one choice among various technologies for handling roaming data. Some other options include Windows Azure SQL Database, which supports many newer platforms through Windows Azure Mobile Services, and also enables features like push notifications. SkyDrive is a free alternative to Windows Azure that works nicely as a lightweight data solution. For Windows Store apps, you can also use the roaming app data feature provided for Windows 8. If you want to create an app that accesses file-based user data, SkyDrive is a good choice. Also, SkyDrive offers larger storage capacity than the roaming app data feature. For more info on handling app data vs. user data in Windows Store apps, see App data.
SkyDrive Roaming Data
We had a small team that investigated some different technologies for accessing roaming data. I implemented the SkyDrive solution as a Windows Store app built using JavaScript.
To download the sample, go to SkyDrive Roaming Data.
The sample includes these features:
- Searching for files using friendly file names.
- Uploading and downloading files.
- Reading from and writing to files.
- Caching data and displaying cached data.
- Creating new files and folders.
- Enabling single sign-on using a Microsoft accont.
- Using SkyDrive session state information.
For information on using SkyDrive and how the sample works, see the documentation attached to the sample:
- Overview of using SkyDrive Roaming Data
- Interacting with SkyDrive
If you want to download photos or images from SkyDrive, you should also look at the PhotoSky sample.