Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I was wondering what design patterns every developer, no mather what dev language, should know and why?

share|improve this question

closed as not constructive by tdammers, jk., Thomas Owens Mar 8 '13 at 11:46

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
What every question asker needs to know: programmers.stackexchange.com/faq (Specifically: "Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much."). –  dan1111 Mar 8 '13 at 11:05
    
Dude? This is a good question for starting devs? –  Tom Kerkhove Mar 8 '13 at 12:54
1  
Yet another case of a perfectly good question being closed. @dan1111 I completely disagree with your statement, there are a ton of design patterns, and whilst all of them are useful, there are some more than other that are important to know. –  Sam Mar 8 '13 at 13:03

1 Answer 1

up vote 1 down vote accepted

Well, knowing about design patterns is the first step...

Here's my list of the more important ones, and why.

  • Abstract factory - Important for creating objects without needing to specify their concrete implementation
  • Builder - For building objects and taking care of complex initialisation
  • Pooling - Management of finite, heavy resources such as threads and connections
  • Singelton - When, and when not to use it
  • Adaptor - For converting an object to another
  • Facade - For simplifying and unifying access to an object
  • Proxy - this is very important, you'll never understand how ORMs and Mocking works without knowledge of this pattern

In terms of enterprise patterns I would say:

  • Domain model - For representing your problem domain
  • Data Transfer Objects (DTO) - for transporting relevant information between objects
  • Repository - Unified data access
  • MVC - Separating the view, the view information (model) and the controller
  • Service Layer - For implementing SoA-based applications
share|improve this answer
    
Thanks, very nice overview! –  Tom Kerkhove Mar 8 '13 at 12:55
1  
Your welcome. For what it's worth I think your question was entirely valid. –  Sam Mar 8 '13 at 13:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.