Right from the first release of Microsoft Sync Framework, one of the most common requests we have received is for the ability to take SilverLight applications offline, meaning that users can continue to access their applications and data regardless of connectivity to the backend web application. Using this architecture, developers can build much richer applications and also take advantage of the local machine resources to provide fast data access. In addition, the ability to easily deploy SilverLight applications either within a browser of within an out-of-browser application makes this platform a very popular choice when building rich internet applications.
In the past there were a few issues that we had when trying to enable this functionality, but now with the latest release of SilverLight, much of what we require to provide offline capabilities is available. At this year’s Professional Developer Conference (PDC), Mark Scurrell introduced everyone to this set of capabilities in his session: “Using the Microsoft Sync Framework to Connect Apps to the Cloud” (overview starts at 44:40 minutes into session). Using the PDC conference session web site he showed how we built a rich SilverLight application that allows a user to take the sessions data offline into isolated storage, and while the user is offline they can continue to view sessions, add sessions to their calendar, rate attended sessions and then, once back online, the application automatically takes the changes and uploads them to the main agenda web site (demo starts at 48:00 minutes into session). The screenshot to the left shows an example of what this application looks like.
In order to truly take advantage of SilverLight’s cross platform capability we had to come up with a solution where we could still support clients that do not have a Sync Framework runtime. To do this what we did was build the architecture such that all of the core Sync Framework logic resides on the service (in this case a Windows Azure Webrole), and that is where all of the heavy lifting of the synchronization process is executed. From the service we exposed a simple HTTP-based synchronization protocol that the client consumed, allowing any client to participate in synchronization. Currently the best offline store within SilverLight is isolated storage, and as you can see in Mark’s demonstration of filtering data, this is sufficient to build a rich and very quick data-access application.
Over the next year you will see more of how we plan to enable this scenario and we will provide additional details on what you can do to get started to build these offline-capable applications using SilverLight.