Silverlight 2.0: Creating an Offline Application (Smart Client), Part 1

The following is part 1 of a series of posts for creating an offline application using Silverlight 2.0

Introduction

Once of the alluring aspects of Silverlight is creating an application with a pretty broad reach (cross-platform/browser) using technologies familiar to the “Microsoft Developer” (C#, VB.NET, etc.) together with some common application patterns (smart clients).  This series of posts is intended to plug the gap in creating a Silverlight 2.0 application that completes the “smart client” pattern with occasionally connected (read: “offline”) features.

Problem

Silverlight does have many of the aspects of a “smart client,” such as …

  • Automatic/intelligent installation and update
  • Broad client platform/device reach
  • “Connected” to back-end services (like LOB logic)
  • Use of local resources

… and some added of it’s own:

  • Very small runtime size (~4 MB)
  • Low client requirements (a browser)
  • Declarative programming model (XAML)
  • Rich UI Framework (Rich Internet Application)

However, it currently lacks formalized support for the most prominent feature of being occasionally connected.  Customers, however, are unwilling to compromise and want all of the above, together, without having to learn a new platform and a set of technologies (like Flash, for example).

Silverlight 3.0 promises new features to help in implementing these new features it is not out yet (in Beta at this time) and customers may already have a need for Silverlight today or have existing application in Silverlight 2.0.

Solution

The good news is that, with one exception, Silverlight 2.0 is fully equipped to handle the offline scenario with little additional effort over what may be coming in 3.0 or what you may have today with other Smart Client or Rich Internet Application (RIA) technologies.

The following techniques will be demonstrated in the upcoming series of posts:

  1. Offline, persistent, secure storage: Isolated Storage
  2. Synchronization with back-end services
  3. Detecting the network and connectivity to the back-end services
  4. Re-launching the application while offline

Companies can create fully disconnected application today in Silverlight 2.0 and I’ll walk you thought the process in upcoming posts.  If you would like to see anything specific please feel free to add some comments and I’ll try and incorporate those into subsequent posts.

Advertisements

Silverlight: Cloud Connected

A few weeks back I delivered a presentation on connecting Silverlight to services (web, SOAP, REST, etc.) as well as some practical real-world offline caching of data.
Here was the actual agenda from the slides:
  • “Wiring” up a Silverlight 2.0 application to a bunch of services
  • Demonstrations of leveraging WCF, ASP.NET Data Services/REST, XML
  • How you can quickly bind data through XAML in a pain-free manner.
  • A glimpse into the designer/developer workflow
  • Some discussions on differences you’ll notice from WPF.
  • A hands-on demo of the tools you’ll use in SL development
  • Some other stuff (LINQ, Lambda expressions, type inference, blah blah blah blah)
  • Working with IsolatedStorage in an attempt to have this thing work offline
Demo code is here.  Slides are here.