views:

76

answers:

3

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?

+1  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.

Cylon Cat
The Sync Framework is not Silverlight friendly, yet. Many people have requested this, and MS has replied they are looking into it.
Matt Greer
@Matt, thanks for the update. Seems like this ought to be a priority item.
Cylon Cat
+1  A: 

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?

almog.ori
is there some documentation on the project?
Jakob
there should be, its not to hard to get though
almog.ori
+2  A: 

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.