Paul Sasik
Paul Sasik

Reputation: 81459

.Net patterns vs. GOF

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.

Upvotes: 2

Views: 445

Answers (5)

John Rudy
John Rudy

Reputation: 37850

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.

Upvotes: 13

Meta-Knight
Meta-Knight

Reputation: 17845

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.

Upvotes: 2

Brian Rasmussen
Brian Rasmussen

Reputation: 116401

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.

Upvotes: 3

yfeldblum
yfeldblum

Reputation: 65435

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.

Upvotes: 1

Mikeon
Mikeon

Reputation: 10749

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

Upvotes: 0

Related Questions