# Sunday, April 11, 2010

Imagine this scenario :

  • You've built a Silverlight application with the out-of-browser feature.
  • This application is installed on multiple computers.
  • You may work with your Silverlight app without being connected.
  • You want to avoid complex sync programming and you don't want to use server-side data service(s).

In this scenario, you need to work with a local repository to persist your data. Keep it simple and let's consider an XML file to serialize your data (for more complex scenario, this article may be a source of inspiration).

But… Implementing a data sync pattern may lead to headache.

How to avoid writing a server sync service, a (proprietary?) client agent (with a nice data changes detection), and how to remain the less system-dependant as possible?

Others have done it for you with Dropbox!

Simply said, Dropbox "is software that syncs your files online and across your computers".

Dropbox is stable, secure and very seamless. It works on Windows, Mac and Linux.

For more information about it and if you want to register, go here (and, at your turn, invite your friends to earn more space).

So, come back to our Silverlight OOB application. Here is then my architecture suggestion:

You can try it with this application : DropboxSLOOB

To use it :

  • Install the application on your computer (out-of-browser with elevated privileges) clicking the button

  • Your Dropbox folder MUST be installed in your "My Documents" folder.
  • Create a small XML file in your Dropbox folder, copy this :

    <?xml version="1.0" encoding="utf-8"?>

    <Items>

    <Item data="This is an item data" />

    <Item data="This is another item data" />

    <Item data="efefe" />

    </Items>


Now you can get your items and create new ones. And if you try to use another computer with the same application, you'll see that your data is synced! 

To download this test application and the test XML file (it's inside the Visual Studio project), go here.

This application is made under VS 2010 RC with SL 4.0 RC.

Monday, April 12, 2010 12:08:46 PM (Romance Daylight Time, UTC+02:00)
Thanks, nice idea. I'll definitely give it a try!
Christoph
Tuesday, April 13, 2010 10:42:48 AM (Romance Daylight Time, UTC+02:00)
This is the same concept as the concept of Live Mesh Apps MS tried to push in 2008 but it relies on client having DropBox account etc. which can't be taken for granted in case of Joe the WebUser

That been said I am a big fan of sync VS services approach and I put my hopes into Microsoft SyncFramework V3 coming in H2 2010 which would enable easy implementation of file sync (just couple of lines of code) without the need for taking dependency on the external sync app\client
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview