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!