good books for design patterns?

J

John Salerno

Here are a few I'm considering:

Design Patterns Explained : A New Perspective on Object-Oriented Design
(2nd Edition) (Software Patterns Series) by Alan Shalloway

Design Patterns C# by Steven John Metsker

Design Patterns by Erich Gamma

Head First Design Patterns by Elisabeth Freeman


Basically I'm looking for a good intro to what design patterns are
(since I don't know them). I've heard the first book is a good one, but
it uses Java examples. I read on Amazon that the second book is geared
more toward those who already understand design patterns. The third
seems to be the classic, but I worry that it's written more for
experienced programmers also. The fourth seems like another intro book,
but I don't know if it deals with C# much.

Any recommendations between these four, or others?

Thanks.
 
F

Fred Mellender

I favor
"Head First Design Patterns". You can easily translate the examples to
C#. See the reviews on Amazon.

Once you are familiar with the standard DPs, you might find this free e-book
of interest:
http://www.frontiernet.net/~fredm/dps/Contents.htm
which specializes some of the classic design patterns to do graph searching.
It uses C# and shows how generics can be used to effect in implementing
design patterns.
 
G

Guest

Hi John,
I have a copy of the first book "Design Patterns Explained" - although I
cannot compare it against the other books you mentioned because I haven't
read them, I really recommend this book.

It's code examples are in Java, but all examples are fairly basic and do
not use Java Specific classes, so easily translated into C#, plus the
examples in code are not the heart of the book, they just help detail the
concepts.

The book oultlines all the major design patterns really thoroughly, but it
also does an excellent job of talking about what design patterns are from the
ground up and after reading this book you really get a good understanding of
the ideals behind design patterns and how they relate to OOP. The examples
used to emphasise each design pattern are well thought out and clear.

I definitely learnt a lot from reading this book - definitely worth buying
in my opinion. Infact I bought it twice, once for myself and then as a
present for one of my friends :)

My $0.02 :)

Mark R Dawson
 
J

John Salerno

Mark said:
Hi John,
I have a copy of the first book "Design Patterns Explained" - although I
cannot compare it against the other books you mentioned because I haven't
read them, I really recommend this book.

It's code examples are in Java, but all examples are fairly basic and do
not use Java Specific classes, so easily translated into C#, plus the
examples in code are not the heart of the book, they just help detail the
concepts.

The book oultlines all the major design patterns really thoroughly, but it
also does an excellent job of talking about what design patterns are from the
ground up and after reading this book you really get a good understanding of
the ideals behind design patterns and how they relate to OOP. The examples
used to emphasise each design pattern are well thought out and clear.

I definitely learnt a lot from reading this book - definitely worth buying
in my opinion. Infact I bought it twice, once for myself and then as a
present for one of my friends :)

Thanks. I've been leaning toward this one simply because it does seem to
be a good book for explaining the basics and isn't necessarily aimed at
professionals. "Head First" is another one that fits this category, so I
might check these out.
 
G

Guest

Thanks John for asking this question. I've owned the GOF "Design Patterns"
book for four years now, and I find it utterly confusing. IMHO it's written
as if the reader is already knowledgable in design patterns, and just wants a
reference. I've used a few design patterns in my code (namely Singleton,
Observer, and Mediator), and what I've learnt about them I got (mostly) from
other sources. I think I'll purchase "Design Patterns Explained", as
recommended by Mark.

- Javaman
 
J

John Salerno

Javaman59 said:
Thanks John for asking this question. I've owned the GOF "Design Patterns"
book for four years now, and I find it utterly confusing. IMHO it's written
as if the reader is already knowledgable in design patterns, and just wants a
reference. I've used a few design patterns in my code (namely Singleton,
Observer, and Mediator), and what I've learnt about them I got (mostly) from
other sources. I think I'll purchase "Design Patterns Explained", as
recommended by Mark.

Glad my question could help you too! Based on reviews I've read from
Amazon.com, "DP Explained" seems to be a great book even for those of us
not familiar with the patterns. Like I said, I was leaning toward it
anyway because I think most others I've come across are geared toward
experienced programmers.

And since you mention that the original GOF book is a little advanced, I
think I'll steer away from that one for now.
 
?

=?ISO-8859-1?Q?Mart=EDn_Trejo_Ch=E1vez?=

Hi,

Have you considered the material from Patterns & Practices? There is
http://msdn.microsoft.com/practices...x?pull=/library/en-us/dnpatterns/html/esp.asp
or Enterprise Solution Patterns using .NET. Describes fairly well
various patterns and besides includes an implemetation on .NET.

Other good book, altough not a .NET one is "Applied Java Patterns" by
Steltting and Maasassen.

Regards,

MArtín Trejo Chávez
Chilli Coder

John Salerno escribió:
 
R

rkc

John said:
Thanks. I've been leaning toward this one simply because it does seem to
be a good book for explaining the basics and isn't necessarily aimed at
professionals. "Head First" is another one that fits this category, so I
might check these out.

The code in Head First Design Patterns is Java, but the book is
informative, entertaining and enlightening enough so that even a
a numb skull like myself was able to grasp the concepts. Reading
the GOF book was painful. Head First was a fun read.
 
N

Nick Malik [Microsoft]

The GOF book is definitely not useful for a quick read. Reality check: it
was originally Erich Gamma's Doctoral Dissertation. That should explain the
terseness of the language.

I've found that the only way to understand the GoF book is to join a design
patterns study group in your area. Then, you get what you are looking for.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 
D

Doug Arnott

John said:
Any recommendations between these four, or others?

I just ordered "Design Patterns in C#" by Steven John Metsker on Friday.

I looked at "Design Patterns: Elements of Reusable Object-Oriented Soft-
ware" by Erich Gamma back in the days when I wanted to start learning
about design patterns, but I did not know C++. I could not get past the
introduction.

After I had learned the basics of Smalltalk, I bought the "Design Patterns
Smalltalk Companion" by Sherman Alpert when it came out. I understood a
few of the patterns, but I had to shelve Smalltalk when it collapsed in
the marketplace.

If I remember correctly, you are learning C# and you have not studied C++
nor Java. Although Java and C# are very similar software languages in
comparison to C++ and Smalltalk, a book with Java examples may be counter-
productive to you.

The Addison-Wesley web site has a sample chapter from "Design Patterns in
C#" for review. I do not know why they picked the Adapter pattern as the
sample because the Singleton or Observer pattern would of made a simpler
pattern as an example of the writing, that is, most people learn these two
patterns first.

http://www.awprofessional.com/title/0321126971

I find the Adapter sample chapter in the .pdf version easier to read than
the html:

http://www.awprofessional.com/content/images/0321126971/samplechapter/metskerch03.pdf

Anyway, my plan is to digest "Design Patterns in C#" whether it is an easy
swallow or not.

Doug
 
J

John Salerno

Doug said:
I find the Adapter sample chapter in the .pdf version easier to read than
the html:

http://www.awprofessional.com/content/images/0321126971/samplechapter/metskerch03.pdf

Anyway, my plan is to digest "Design Patterns in C#" whether it is an easy
swallow or not.

Doug

Thanks, I'll take a look at that sample. My only worry with this
particular book, though it seems to be ideal since it concerns C#
specifically, is that I read a review on Amazon that says you probably
need to use another DP book along with it in order to explain them more
clearly. So I worry that it's going to be almost as hard to follow as
the GOF book.
 
N

Nick Malik [Microsoft]

I have Design Patterns in C# as well as most of the other books you've
mentioned.

Start with Shalloway's "Design Patterns Explained". Hands down the best for
clear writing. Don't worry about the programming language.
Design patterns are NOT language specific. They can be coded in any OO
language. As I frequently say, "thats just syntax."

If you do decide to try to follow a reference work like Design Patterns in
C#, then I recommend you follow a specific sequence for learning the
patterns. Go here: http://www.industriallogic.com/papers/learning.html


--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top