views:

67

answers:

4

i've read about design patterns and it seems that there are a lot of different design patterns to use.

i wonder if there are some books that acts like a reference.

"you want to build a framework, then consider this, this and this pattern". also giving some examples. then jumps to another implementation eg. search engine and gives some patterns and concrete examples to use.

in this way you learn about the weakness and strength about each pattern and where they will fit, instead of just reading about every design pattern decoupled from each other.

are there good "reference sheets" or other tutorials good for a beginner at this?

thanks

+3  A: 

Frameworks require deep knowledge of the problem domain they wish to solve. That's far more important than application of patterns.

Patterns are common solutions to common problems in object-oriented design. If you're approaching a solution starting with patterns, I'd say that you're leading with the wrong foot.

Identify the domain first and base your design on what you know about the problem.

I'd say that a really good framework should not be undertaken until you've attempted to solve the problem once or twice. The framework should be informed by what you learned about what worked and what didn't from your previous attempts.

duffymo
+1 Design patterns are not necessarily tied to frameworks. They are just solutions to general recurring problems that have been studied and documented. Frameworks need to be extracted from two or more attempts at solving problems in the same problem space..
Gishu
I think I said all that: "...common solutions..."; "...attempted to solve the problem once or twice..."
duffymo
+1  A: 

In my experience reading will only get you this far. If you want to get a real feeling for design patterns -- including how a set of patterns compete when they solve the same problem, then you need to get your hands dirty. Good design pattern books (GoF, Head First, ...) will give you all the abstract information you need about the patterns. But in reality some patterns are more useful than others in different languages. Again, you'll need to get your hands dirty in various languages to feel where some patterns are more useful than others.

wilhelmtell
+1  A: 

Actually there are lots out there, and quite a few free pdf's / websites etc. The key is to specify the language in your search.

The gang of 4 book is language independent, and some languages have elements of patterns built into them (multicast delegates in C# for example)

So refine your google search to include the language of your choice and you will get back plenty results.

Tim Jarvis
They're language-agnostic among OOP languages
nandu
All patterns are language agnostic. The samples in GoF are Smalltalk and C++.
duffymo
ummm, this is my point. If you want to see an implementation (what the OP asked) you need to specify a language. A vistor pattern for example would be implemented differently in C# to say Delphi
Tim Jarvis
A: 

The GoF is always a good reference, but, if you want a reference card, you can see here:

http://www.mcdonaldland.info/2007/11/28/40/

Andersson Melo