views:

663

answers:

15

Recently I came about this concept of Design Patterns, and felt really enthusiastic about it. Can you guys suggest some resources that help me dive into Design Patterns?

+4  A: 

Wikipedia, the Gang of Four book, and if you're specifically interested in C# implementations there's a decent site here.

Steven Robbins
+13  A: 

You know, for me, one of the best books out there is Head First Design Patterns. I personally like the style that they use to communicate the material.

Mitch Baker
+1, I loved this book. My first on Design Patterns. Reading GoF Design Patterns was much easier because of this book.
SirDemon
I appreciated the book's attempt at being 'down-to-earth' and easy to read, but I just didn't get the examples. To me, making a pizza is not a realistic subject of oop. Just my personal point of view. *shrug*
John Kraft
Yeah, I know what you mean. One of the things that I liked about this book is how they built up the concepts. I've run into many design patterns books and articles that clearly state define the pattern, but completely fail at explaining what it is or how to truly use it.
Mitch Baker
+2  A: 

The gang of four design patterns book is the standard. I recommend it if you're comfortable with C++.

Head first design patterns is good too, especially if you like visual aids and want to feel like you're learning design patterns in a '50s diner. Examples are in Java.

There are sometimes multiple ways to implement patterns in a given programming language (for example see this discussion of options for implementing the Singleton pattern in C#), so it might be worth getting one book to succinctly describe the common patterns, and another to suggest the best way to implement them in your favorite language.

Daniel Weaver
A: 

Really, I think the best way to learn them is to deeply understand your language (C# based on your tags), and then to really commit yourself to the goals of having good separation of concerns, low coupling and high cohesion. I'd read and study Robert Martin's writings about SOLID principles.

And then (and this is the most important part), try to follow those principles as you develop software. You'll find that you start to do certain things, and later it will hit you, "Oh! That was the strategy pattern." This is truly what the "pattern movement" demonstrates ... people working in a certain kind of language, trying to achieve good software design, will find themselves arriving at solutions that follow certain common patterns.

Charlie Flowers
Wow, I had *no idea* there was a "controversy" between Jeff Atwood / Joel Spolsky on one side, and Bob Martin on the other. I don't listen to the podcast, so hadn't heard about it. But Robert Martin has documented these principles for a long time. The principles exist in reality (no one makes ...
Charlie Flowers
... up principles, they are discovered), but Robert Martin does an excellent job of articulating them. The "SOLID" acronym is new (and kind of silly to me), but the ideas are first rate.
Charlie Flowers
A: 

I like these 2...

http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612

http://www.amazon.com/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351

this one really helps with taking existing code and implementing a design pattern.

J.13.L
+1  A: 

Here is a very nice screencast series on Design Patterns on DnrTV

Part 1 Part 2 Part 3 Part 4 Part 5

Hope this is more inviting ;)

Ali Kazmi
A: 

I find Design Patterns Explained to be a good introductory text. The Gang of Four book is a reference for those who already understand patterns.

George V. Reilly
A: 

Martin Fowler's website has plenty of information: http://martinfowler.com/articles.html. Much of this is covered also in his book, Patterns of Enterprise Application Architecture.

Dave Cluderay
+2  A: 

I frequently reference this site: Design Patterns . It has a nice write up including examples for all the popular design patterns for free.

Element
this is a great website, shame they don't use paypal and use their own stupid payment page. Just to donate.
dr. evil
A: 

For those using C#, I found Design Patterns in C# a bit easier read than GoF's book. The examples of course are in C# and the connection is made to the Microsoft naming of the patterns.

Greg Ogle
+1  A: 

One of the best books is (as mentioned above) the Head First series because it gives great analogies and real-world examples.

There are also other decent Java Design Pattern books available. Also, web sites that are specialized on the subject (see posts above for some)

Although the Gang of Four book was my first read on this subject, it is my opinion that you should avoid it especially if your starting out. At the time this was the reference, but today many books exist giving you many to choose from.

BUT, and I clearly emphasize this point... practice is the ultimate learning tool. After having read several books on the subject, I was 100% certain of knowing and understanding these patterns. When I attempted to actually implement some of them I soon realized that my knowledge was mostly 'theory' and my comprehension wasn't even close. A huge blow to my ego!

I set out to test and challenge my peers and quickly learned that they were in the same boat as I was. I find that 99% of programmers proclaim to know patterns but when really put to the test, only about 1/3 actual know the subject well.

I set out to implement as many patterns as I could in one or more complex systems. I put theory to practiced and what I learned was a gold mine.

One of the most challenging aspects of my experience was that each pattern alone look simple. But sometimes linking a bunch of patterns together can be even more challenging.

I encourage you to put theory to practice!

Jeach!

Jeach
+1  A: 

Head first design patterns book is a good read.

If you want to test your knowledge of design patterns , here is the design patterns quiz

vsingh
A: 

Last year I bought and read C# 3.0 Design Patterns, by Judith Bishop and I've been very pleased with it, having previously tried to get through Go4 and Design Patterns in C#.

This covers the standard set of patterns, grouped by similarity, in order of increasing complexity, but also ties them in to the language features of C# 3.0, so you start with simple cases with interfaces and abstract classes, and move up through extension methods, generics, anonymous types, functions, etc - a very good way to learn both.

All presented in an easy to read format, with quite a few real world examples and handy source code.

Zhaph - Ben Duguid