Windows Phone 8 Sync

 

A lot of the below depends on the types of data, how often it is changing, and how often it is likely to conflict.

 

If:

  • The data modified offline is likely to be separate from data that is downloaded / refreshed, or
  • A data synchronisation pattern is in play for other mobile clients (iOS, Android etc)

 

Then it is probably easiest to hand roll synchronisation based off:

  • A background task downloading changes (based on ModifiedOn or similar) from a REST service.
  • Local SQLite database
  • Manually trigger refreshes on application open or explicit button commands

 

Background tasks can be triggered up to every 15 minutes if running as a lock screen application, and can handle online / offline mode switching.

Push notifications can be used if 15 minute resolution is not fine enough. Azure mobile services or notification hubs on to of Azure Service Bus would probably be the simplest way to achieve this.

 

If changes are likely to be more complex (read/write from client, concurrency protection required) then a sync framework is probably useful.

The Sync Framework Toolkit (http://syncwinrt.codeplex.com/http://blogs.msdn.com/b/mim/archive/2013/02/19/synchronization-with-sqlite-on-winrt.aspx) is the evolution for WinRT of Microsoft’s Sync Framework. This has some complexity, but if developers have used it before (and especially if backend is SQL based) this removes the requirement to rewrite much of this code.

 

转载于:https://www.cnblogs.com/MinieGoGo/p/3407822.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值