Reader Level:
ARTICLE

Using Cloud Service in Collection Data Source

Posted by Arpit Jain Articles | Windows Phone January 06, 2014
In this article we will learn about the collection Data Sources of Windows Phone App Studio with cloud storage.
  • 1
  • 0
  • 1761

 

Introduction

In this article we will learn about the collection Data Sources of Windows Phone App Studio with cloud storage. First we will learn about collection Data Sources and then we will see how to add them to our application and how to enable cloud storage in it. In my previous article we saw how to work with static collections. In this article I'll focus on "App Studio resources" or Cloud storage options of collection Data Sources. Before that let's take a brief introduction to various collection types.

Collection Data Source

Windows Phone App Studio supports two types of collection Data Sources. One is static data resource based and the other is App Studio Data Service based. Both Data Source types have their own specific use and the differences between them become very clear from the next paragraph. This article is focused on cloud data storage only.

Static resources

  • A static resource type refers to static data.
  • In this Data Source we can configure our data table data only once, during the app development.
  • Once the app is published, you can't change the app data.
  • This Data Source can work offline.
  • The data is stored in an app itself.

App Studio Cloud Data Service

  • This service refers to cloud data services of Windows Phone App Studio.
  • The data can be changed even after the app is published.
  • This Data Source requires an Internet Connection for application.
  • The data is stored on a cloud database.
  • The app is updated with the new data if the data is changed using Windows Phone App Studio.

This article is focused on the App Studio cloud data service.

Adding Collection Data Source

To add a collection Data Source:

  • First open the "Configure App content" page of the App Studio.



  • Click on "+" and select "Add Section" from the Pop-up.



  • On the add section page, add your section name.
  • Choose the Collections as Data Source type
  • Enter the Data Source name.
  • Click "Save changes".


You are done with adding the Data Source. Now the next step is to make it ready for our use.

Setting Collection Data Source

To add the data or content in your Data Source:

  • Click on your newly added Data Source.
  • You can add your data by clicking on the "create Item".



  • Fill your data in the pop-up and click "Save".



  • To save the Data Source, click on "Save changes".

Enabling Cloud data service

So far it has been the same as we have done in a static Data Source but now we want to store our data in the cloud. To store our data in the cloud we need to use a cloud storage service provided by App Studio. This service is named "App Studio Data Service". To use this service:

  • Click on your Data Source for which you want to use this service
  • Now select the radio button of "App Studio Data Service".



  • Click on "Save changes" to save the settings.


If everything is done correctly then you will notice that your Data Source icon is now changed to the cloud Data Source type.


Now you can change the data of your app even after it is published. The data of your app will be automatically updated.

Summary

In this article we used the dynamic resources type collection. In my previous articles I have already explained how to import, export, alter tables and explained static Data Sources. In my next few articles we will create some wonderful apps using this Data Source and collection service. Thank you for reading this article. Don't forget to comment and share.

COMMENT USING

Trending up