Telerik blogs

Shortly after the Q2 2013 release of RadControls for Windows Phone we’ve announced the CTP version of our entirely new Telerik Cloud Controls for Windows Phone suite that aims to shorten the way to making your app connected to the Cloud. Besides the cloud-enabled UI controls we’ve also released the Cloud Data Sync component which you can use to synchronize Cloud data between multiple devices.

Based on the feedback we’ve received, we are now further extending the functionality of Telerik Cloud Data Sync by introducing support for Data Relations and separate synchronization operations execution.

The Data Relations support allows you to easily define parent-child relationships on conceptually related objects like Product – Category, Person – Order, etc. The infrastructure that supports this is quite simple:

  • The RelationAttribute which is a CLR attribute that is defined on a property to describe the relation
  • The ISynchronizableDataItem.GetRelatedItems<T>() method which is used to retrieve all related items of a given object that are of type T.

Of course both the parent and child types should be part of their corresponding SynchronizationContext.

Additionally, we have extended the synchronization API to allow you to choose which synchronization operations will be executed. A normal synchronization call triggers the following operations:

  • Reading of the local database in memory
  • Deleting of all local items that have been removed on the server or marked as deleted locally
  • Downloading of all server changes and storing them locally
  • Uploading of all local changes to the cloud

Now, if you want to execute a given operation only, you are able to do this by calling the new overload of the SynchronizeAsync method which accepts a value or a combination of values of an enum which enlists the following options:

  • Download
  • Delete
  • Upload
  • ReadLocalDatabase

You can find the latest version of the Cloud Data Sync component in the Q2 2013 SP1 package which has been released recently. We have updated our online help contents as well so that it's easier for you to dive into the new Data Relations APIs.

Let us know what you think!


Deyan Ginev
About the Author

Deyan Ginev

Deyan has been with Telerik for more than ​six years working on several different products with main focus on mobile technologies. Deyan is currently working on NativeScript– a platform for developing native mobile apps with JavaScript. Find him on Twitter via
@deyan_ginev.

Related Posts

Comments

Comments are disabled in preview mode.