Stephen Cleary's Publications



MSDN Magazine, July 2015

Brownfield Async Development

Asynchronous code is pretty straightforward if you don't have any existing code to maintain, but it can be much more difficult when working in a brownfield scenario! This article discusses a variety of approaches to introducing asynchronous code while maintaining backwards compatibility.

MSDN Magazine, November 2014

Unit Testing Asynchronous Code

An exhaustive look at unit testing async methods. This article covers the basics of unit testing async methods, mocking techniques, and special considerations. Also includes an overview of the current status of common unit testing frameworks (MSTest, xUnit, and NUnit) as well as some helper libraries (e.g., Moq, Microsoft Fakes), with a look at future directions.

MSDN Magazine, October 2014

Introduction to async/await on ASP.NET

Most async tutorials assume a client-side application. But does async have a role to play on the server? The answer is most definitely "yes!" This article examines async on ASP.NET applications: the benefits of async, how it works in an ASP.NET environment, and common pitfalls to avoid.

O'Reilly, May, 2014

Concurrency in C# Cookbook: Asynchronous, Parallel, and Multithreaded Programming

An introduction to asynchronous, parallel, reactive, and dataflow programming; and a reference for common solutions.

MSDN Magazine, May 2014

Patterns for Asynchronous MVVM Applications: Services

The third in a series on dealing with async and await in Model-View-ViewModel applications. Considers common patterns for asynchronous services: how async interacts with inheritance, factories, unit testing, lazy initialization, and construction.

MSDN Magazine, April 2014

Patterns for Asynchronous MVVM Applications: Commands

The second in a series on dealing with async and await in Model-View-ViewModel applications. Examines several patterns for representing asynchronous operations as MVVM commands (ICommand).

MSDN Magazine, March 2014

Patterns for Asynchronous MVVM Applications: Data Binding

The first in a series on dealing with async and await in Model-View-ViewModel applications. Introduces a pattern for data-binding to the results of asynchronous operations.

MSDN Magazine, March 2013

Best Practices in Asynchronous Programming

A "second step" for learning async; a good followup read after an async tutorial. Provides guidelines for avoiding common pitfalls, and includes several cheat sheets and resources for async development.

MSDN Magazine, February 2011

It's All About the SynchronizationContext

A thorough look at the SynchronizationContext type, starting with some history and concluding with how it is used by various components (including components in development such as the compiler support for async and await).

Dr. Dobb's Journal, October 2000

C++ Type Traits

A brief description of the Boost.TypeTraits library, which uses advanced template techniques to determine (and manipulate) type properties at compile-time. This was the first article on template metaprogramming; the TypeTraits library provided the groundwork for more advanced template metaprogramming. Co-authored this article with John Maddock.