views:

168

answers:

10

What design pattern is most used?

What design pattern should I learn first?

A: 

Not sure about most important ... but the one I use most commonly is the Factory pattern.

All the patterns have a place, depends on what you want to achieve. They are ALL important as they give us a common language we can use to describe "types" of solution.

Kindness,

Dan

Daniel Elliott
+1  A: 

The template method is quite elegant to remove code duplication.

Vladimir
A: 

This always depends on the problem you're trying to solve.

Peter Stuifzand
+6  A: 

Whichever you need to get the job done!

Each has its own purpose. There really is no 'ultimate' design pattern.

Justin Niessner
A: 

It depends on the purpose.

Ex.

I don't need facade pattern for creating objects (builder pattern) in my own simple two methods objects. ...

However this is duplicate of many similar topics.

bua
A: 

If I have to choose one I would say RAII.

/A.B.

Andreas Brinck
+4  A: 

Your brain. It's not really a design pattern, persay, but it's the gateway to all good design decisions. :)

Greg D
Double bladed sword, mate. Mine has been the gateway to a few coding atrocities that I'd rather not elaborate on.
Gazzonyx
A: 

I think a working knowledge of what patterns are, how/when to use them in general, detect them in code, evolve your own pattern descriptions, et cetera is more important to a software developer than any one specific instance of any specific software design pattern. Not really a (concrete) answer to your question, but there you go..

peSHIr
A: 

No pattern is superior to the other. They all have their place in every design.

It just like different ingredients for soups. You can't use all in one soup. You choose the soup and the ingredients right for it.

Colour Blend
A: 

The most common pattern in use is the Strategy Pattern - but if you "choose one pattern" for everything, you're not really getting the point of patterns.

The idea of design patterns is that we (as developers) should have a working knowledge of all of the key patterns (and where they are useful) so we can share a language. Rather than describing a solution to lots of people, we can just say "Factory Pattern" and we all know what that is.

Sohnee