TechBookReport logo

Keywords: Design patterns, object oriented design, C#, .NET

Title: C# 3.0 Design Patterns

Author: Judith Bishop

Publisher: O'Reilly

ISBN: 059652773X

Media: Book

Level: Introduction

Verdict: Highly readable


The original Design Patterns book, by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (to be forever known as the Gang of Four), introduced both the idea of design patterns to the software domain but also 23 specific patterns. While remaining an extremely influential book, the fact that the examples were written in C++ (and some Smalltalk) meant that for many developers the code has remained out of reach. Of course this has meant that there have been any number of books that introduce these 23 design patterns in specific languages: Java and Ruby, for example. Judith Bishop's book looks at one specific version of a language: C# 3.0 to be exact.

The book provides a complete round-up of the 23 patterns introduced in the GoF book, and in doing so also introduces those new features of the C# language that lend themselves to the task. While there's no assumption of prior knowledge of design patterns, there is obviously, an assumption that the reader has some basic competence in C# (though not necessarily the newer language features introduced in C# 3.0). There's also a use of basic UML notation, but for those unfamiliar with this there's a very quick introduction to provide the necessary information to decode the class diagrams included in the book.

Before diving into the patterns, the author takes the time to explain the motivation behind patterns and why they are useful. It's a brief introduction to the subject for sure, but the emphasis of the book is very much on the practical rather than the theoretical.

The rest of the book is structured around the patterns, which are grouped as they are in the GoF book. Each pattern is introduced in the context of the software problem it is trying to solve, with a statement of the problem then some discussion of an illustrative example followed by sections on design and implementation. The examples tend to be fairly simple without being too simplistic, and on the whole they are well chosen. It's in the design and implementation sections that we get down to object oriented design and C# coding. There's plenty of sample code in the book, including the skeleton of some nice little applications.

Where it makes sense there's a discussion of specific language features, for example LINQ is discussed in the context of the Iterator pattern. For those still using C# 2.0 these new language features are introduced gently, but the focus of the book is on the patterns and not on the C# language.

If there's a criticism it's one that can be levelled at plenty of other design pattern books - it's that the examples are chosen so that they best illustrate the use of one design pattern at a time. In real life requirements are never so simple, and you often find that there's a certain meshing of different patterns in the one bit of code. Allen Holub's 'Holub On Patterns' is one of the few books to draw this out, however Judith Bishop's book sets out to introduce each of the GoF patterns, which is exactly what she does. For C# developers wanting to get a handle on design patterns this is a good place to start.

Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2008. Published March 05 2008