silverlight将isolatedstorage与数据库同步
由于使用 silverlight 的isolatedstorage 存储可以提供一种在本地存储用户数据并且无需连接到互联网的方法,因此我很想听听您对智能同步 dbdata 和 silverlightisolatedstoragedata 的想法。
我目前已经实现了一个解决方案,但对我来说似乎有点复杂,所以我想听听我是否可以采取不同的方式。
我有一个保存到 isostore 的文档对象列表。
该文档具有 (datetime)DateModified 和 (bool)DeleteOnSync 属性,这些属性对于同步至关重要。当用户连接到互联网时,应用程序将检查存储在数据库中的文档列表与 isostore 中的列表,并将两个列表合并为一个,其中(如果两个对象共享 id)只有最新文档(带有选择最新的 DateModified)。加入列表后,将查找“DeleteOnSync”,其中此属性设置为 true 的文档将从 db 和 isostore 中删除。然后,它将这个新列表保存到数据库和 isostore。
这有道理吗?
Since use of isolatedstorage storing for silverlight can provide a method for storing userdata locally and whikle not connected to the internet, I'm interested in hearing your thoughts about intelligently synchronizing dbdata and silverlight isolatedstoragedata.
I've currently implemented a solution, but it seems a bit complex to me, so I'd like to hear if I could have done it differently.
I have a list of documentobjects that I save to the isostore.
the document has (datetime)DateModified and (bool)DeleteOnSync properties which are essential to the syncrhonization. When the user connects to the internet, the app will check the list of documents stored in the db with the list in the isostore and join the two lists into one where (if the two objects share id) only the newest document (the one with newest DateModified) is selected. When the list has been joined there will be a lookup of "DeleteOnSync" in which documents with this property set to true will be deleted from both db and isostore. It then saves this new list to both the db and the isostore.
Does this make sense?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
微软最近发布了SyncFramework 3.0的CTP,可以实现与包括Silverlight在内的多个客户端的离线同步。客户端不需要运行时,但您必须实现一个协议来处理更新。
您可以从会议获取有关此版本的更多信息Mike Clark 在 MIX10 上发表演讲。
您可能可以在此处从 NinaH 获得 CTP 版本的邀请:--http://social.msdn.microsoft.com/Forums/en-US/syncdevdiscussions/thread/d2611400-e3c3-4ed8-a28a-25185ce3ffc3--
干杯,
D .
Microsoft has recently released the CTP of SyncFramework 3.0 that enables offline sync with multiple clients including Silverlight. There is no runtime required on the client, but you have to implement a protocol to process updates.
You can get more information about this release from the session that Mike Clark presented at MIX10.
You might be able to get an invite to the CTP release from NinaH here: --http://social.msdn.microsoft.com/Forums/en-US/syncdevdiscussions/thread/d2611400-e3c3-4ed8-a28a-25185ce3ffc3--
Cheers,
D.
有道理,但您可能还想看看 Microsoft 同步框架< /a> 看看它是否可以为您节省一些工作。
Makes sense, but you might also want to take a look at the Microsoft Synchronization Framework and see if it can save you some work.
我正在制定一个解决方案,涉及将数据服务器端动态旋转以将客户端绑定到数据网格,到目前为止,我已经实现了 http: //silverdb.codeplex.com/ 来自 codeplex 作为 isostore 的外观,因为我喜欢 linq 语法及其可读性。你可能有兴趣?
i have a solution under way that involves dynamic pivoting of data serverside to be bound clientside to a datagrid, so far ive implemented http://silverdb.codeplex.com/ from codeplex as the facade over the isostore because i like the linq syntax and its readablity. You might be interested?