Chapter 10. Synchronizing With the Server

In Chapter 1, Introducing the Project: The SmartCA Application, I stated that one of the requirements for the SmartCA application was that it must be offline capable. Now, when I say offline capable, the best example that comes to mind is Microsoft Outlook. In Microsoft Outlook versions 2003 and above, you can work connected to or disconnected from your email server and still have a good user experience. During this chapter, I would like you to keep in mind how Microsoft Outlook works in order to understand some of the design decisions presented later in the chapter.

The Problem

Thanks to using a local data store on the client, the SmartCA is definitely offline capable. Now, the challenge is to get it online and connected to the server. I am going to be calling this process of connecting to the server and transferring application data back and forth the Synchronization process.

What the SmartCA application needs is an intelligent, service-based way of synchronizing its data with the server. The user should not be bothered with any silly errors because they are not connected to the network or the Internet, they should be able to do their work, and the application should gracefully handle the transactions and pushing the data back and forth.

The Design

I also mentioned in Chapter 1 that I would be using Microsoft Synchronization Services for ADO.NET for this synchronization, but I have since changed my mind. After analyzing the problem domain further, ...

Get .NET Domain-Driven Design with C#: Problem – Design – Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.