tags:

views:

188

answers:

5

Since the GOF book was put together well before .Net came into being, are there any specific patterns described in GOF that are not appropriate for .Net? And if so, for what reason?

This is a question relating to a recent bounty discussion.

A: 

No. Even the Observer which is a first class citizen in .NET (events) has it's uses as the recent Rx Framework shows.

Mikeon
+1  A: 

The GoF patterns tend to apply, in general, to object-oriented languages and, more specifically, to strongly typed languages or to languages with more severe strictures.

Justice
+3  A: 

The book C# 3.0 Design Patterns discusses the original design patterns in a .NET context. It is not as good as the original book IMO, but still worth a read.

Brian Rasmussen
+2  A: 

Well, some have limited use because they are already implemented in the framework.

For example, collections in .NET already support iteration out-of-the-box, so you wouldn't need to implement the Iterator pattern in most cases. Another example is Events which can be used instead of implementing the Observer pattern yourself.

Meta-Knight
+12  A: 

The idea with the GoF book wasn't to be language-specific, although they did provide samples to better explain the designs.

The idea was to provide patterns which appear again and again in software design, and something of a cookbook that any developer can use to implement those patterns as needed in their language of choice.

That said, when you look at .NET, as others have mentioned, you will see several of the design patterns implemented as first-class citizens right in the framework.

Are there any "not of use" because of a language? No. The patterns will continue to be useful, even if some are already implemented for you.

John Rudy