Back in April, Susan Joly and I discussed applying agile principles to samples development and delivery. This first project in the overarching Agile Samples Development pilot project was designed to learn how to apply agile principles to samples development while hopefully delivering something of value to you, the customer. After identifying OutlookSyncSQL as our first sample agile project based on a large number of MSDN votes, I defined and published the initial user stories. During the past few months, I published a few iterations (see that build upon each other. This final iteration, and accompanying code, address most of my initial user stories. I decided to remove 2 user stories as they were out of scope. Iteration 4 (I4) is the final iteration for our Agile Samples Development pilot project. I4 uses MVVM concepts and a SyncWorkflow to illustrate how to decouple parts of client code in a model and workflow.

You can download Outlook Contact Data Sync Iteration 4 from our CodePlex site. You can go to our CodePlex site for more information about iteration 4.

To help illustrate the progression of this sample, I created a step diagram.

Final User Stories

User Stories

Addressed in

1. As an Outlook user, I want to synchronize contact fields to a SQL database.

Iteration 2

2. As an Outlook user, I am occasionally disconnected from the network / internet. Therefore, I need my contacts available while offline.

Iteration 2

3. As a user, I want my contacts automatically synchronized with a SQL Server or SQL Azure contact table.

Iteration 3

4. As a user, I want to be able to easily configure the sample application.

Iteration 4 (Final Release)

5. As an administrator, I need to allow a list of specific users to read/write to a specific SQL table during a synchronization session.

Decided to remove this user story

6. As a user, I want to easily install, and cleanly un-install the Contact Sync Addin.

Iteration 4 (Final Release)

7. As an Outlook user, I want to see the progress of an Outlook / contacts table synchronization.

Iteration 4 using MVVM and Workflow

8. As an Outlook user, I want to view a history of synchronization values.

Decided to remove this user story

9. As a user, all of my existing contacts must be preserved while and after running the sample.

Iteration 2

Iteration 4 shows how to invoke a Windows Workflow 4.0 workflow containing a SyncModel extension from Outlook. In addition, it shows a WPF user control hosted in a custom task pane using MVVM. The sample workflow uses notify activities to notify the model that the workflow has started, updated the model and completed. See Windows Workflow Foundation (WF4) - How to use Workflow from WPF for more information about using workflow with WPF. Enabling the sync sample in Outlook is as simple as dragging the NotifySyncUpdatedActivity onto a Sequence activity and setting a few InArguments. Using MVVM and workflow code activities decouples the code from a host such as Outlook. The SyncWorkflow example could be used with any client.

Example SyncWorkflow

You can open the sample Workflow Designer from Outlook. Or you can use the VS.NET 2010 and above workflow designer. The custom workflow designer built into Outlook shows how to self-host a workflow designer that runs code activities such as the NotifySyncUpdatedActivity.

Sample SyncWorkflow:

We are very interested to learn from you how we can apply agile development principles to deliver effective samples. We are learning as we go, and your needs and feedback can greatly help us. The core of our agile sample projects is to better connect with you.

Please provide feedback or questions directly on this blog.

Or contact us directly: Derrick VanArnam ( or Susan Joly (