.Net templates vs. GOF

Since the GOF book was compiled long before .Net existed, are there any specific patterns described in GOF that are not suitable for .Net? And if so, for what reason?

This is a question related to the recent generosity discussion .

+2


source to share


5 answers


The GoF book idea was not language specific, although they did provide examples to better explain the projects.

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



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

Are there any "not used" because of the language? Not. Models will still be useful even if some of them have already been implemented for you.

+13


source


The C # 3.0 Design Patterns book discusses the original design patterns in the context of .NET. It's not quite as good as the original book IMO, but still worth reading.



+3


source


Well, some of them are limited because they are already implemented within the framework.

For example, collections in .NET already support iteration out of the box, so in most cases you won't need to use the Iterator pattern. Another example is events that can be used instead of implementing the Observer pattern.

+2


source


GoF patterns are generally applied to object-oriented languages ​​in general, and more specifically to strongly typed or more restrictive languages.

+1


source


Not. Even the Observer being a first class citizen in .NET (events) uses it, as the recent Rx Framework shows.

0


source







All Articles