by Douglas Reilly, consultant. Intel Corp.
Code libraries may be the key to developing intermittently connected applications. Find out how.
One of the hardest parts of building a mobile application that will be intermittently connected is properly reacting to changes in connectivity and "degrading gracefully" when the user is not connected to the network.
Developers for the Microsoft .NET Framework can find help from the Microsoft Patterns and Practices group, which produces books and white papers on best practices, as well as Application Blocks—code libraries that address common development scenarios.
One of the most interesting Application Blocks for mobile developers is the Smart Client Offline Application Block (SCOAB), which includes most of the code required to support intermittently connected applications, including:
- Detecting the presence or absence of network connectivity, allowing the application code to react accordingly
- Caching data so that the application can continue to function even when a network connection is not available
- Synchronizing client application state and data with the server when a network connection becomes available
Installing the Smart Client Offline Application Block
Installing the SCOAB is easy. You download a Windows MSI file and install it by double-clicking on the file. After installation, there will be a number of new folders in your Program Files folder (in my case, all were under C:\Program Files\Microsoft Application Blocks for .Net\Offline). In the QuickStarts folder under the Offline folder, you will find a number of quick start project folders a couple of levels down. I first opened and tested the ConnectionManagementQuickStart project, and it compiled and worked immediately. There are also links to the various examples in the Program menu, under Microsoft Application Blocks for .NET program group.
A number of other included projects did not immediately work, and when I checked references, I discovered some tie in to other Application Blocks, specifically the Exception Management Application Block, the Data Access Application Block and the Caching Application block. I installed those Application Blocks, and all examples compiled properly. At least one of the sample applications—the Insurance Claims example—requires creation of an MS SQL Server (or MSDE) database. The SQL create script is included in the project folder.
The code provided in the SCOAB can be easily used as is or easily extended to suit your needs. On the other hand, Application Blocks are not complete applications, nor are they designed to be. In addition, the Application Blocks—SCOAB included—are not magic bullets that you can add to an existing application and make it an offline application. You should plan the application with the SCOAB in mind. When you install the SCOAB, it installs a number of Visual Studio .NET Solutions. I first explored the Offline Application Block project. Figure 1 displays the structure of the Offline project in the Offline solution. There are a number of folders, such as Builders and ConnectionManagement, as well as a project below for OfflineProviders.

Figure 1. Structure of the Offline Application Block Project
![]()
![]() | Primer: Developing Multithreaded Applications This 106-page paper is a must-have reference for developing efficient ... |
![]() | WinFX: the new Windows API in Longhorn from Intel Corp. The introduction of WinFX API in Longhorn has so... |
![]() | Multithreaded technology and multi-core processors by Craig Szydlowski, Infrastructure Processor Division, Intel Corp. ... |
If you're interested in this topic, these articles may be helpful:
![]() | Persistence pays off, part 2: the client by Michael L. Perry, president and consultant, Mallard Software Design... |
![]() | Consuming WebSphere Application Server Web services from Eclipse Rich Client Platform applications This tutorial teaches you how to configure an Eclipse® Rich Client... |
![]() | Mobilized applications and solutions: using intelligent documents as enterprise front-ends by Chris S. Thomas. Intel Corp. A growing number of large provide... |
![]() | Connecting Eclipse Rich Client Platform Applications to WebSphere Application Server V6 Service Integration Bus Learn how to write and configure Eclipse® Rich Client Platform (he... |
![]() | Fat is the New Thin - Where Clients are Concerned I sat on a panel back in 1998 that was discussing fat versus thin clie... |
![]()
Related Jobs:


