Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition

12/16/2019 Jeff
by Erich Gamma (Author), Richard Helm (Author), Ralph Johnson (Author), John Vlissides (Author), Grady Booch (Foreword)
ISBN-10: 0201633612

I absolutely loved this book when I first read it. There's a reason this book is considered a classic in the Object Oriented community. I definitely started implementing many of its design principles right away, and still do. I even taught on this book any chance I got.

C#: A bit of a game-changer

As much I loved many of the Design Patterns in this book, I have to say it was interesting to watch changes in C# begin to make some of these patterns obsolete. One pattern in particular, as outlined in this book has become a bit obsolete is the Observer pattern:

Notice that this pattern requires inheritance. Inheritance was very popular when OOD first came out, but over time developers found it to be cumbersome and lead to too much coupling. Any object that had that wanted to receive notification of changes in a Subject was required to inherit from the Observer interface.

With C#, although there is an IObservable pattern, there is also a more simplified version for lighter-weight usage: using an Action<> delegate. It can also be implemented as an event in order to allow mult-cast. Any observer simply needs to provide a function that matches the Action<> and add it to the event. No need for inheritance.

In summary, although some language semantics have changed a few of these Design Patterns, still they remain a viable tool in any object-oriented developers tool-belt!


Please register or login to add a comment.

Comments (displaying 1 - 1):
No comments yet! Be the first...


  • C#/.NET/Core
  • T-SQL
  • HTML/Javascript/jQuery
  • ASP.NET/MVC
  • .NET Core
  • ADO.NET/EF
  • WPF
  • Xamarin/MAUI
  • Windows 10
  • SQL Server 20xx
  • Android
  • XBox One
  • Skiing
  • Rock Climbing
  • White water kayaking
  • Road Biking