views:

121

answers:

5

Hi

Thanks for your valuable time.

I want to learn c++ design patterns. I searched on web but I was not getting documents which gives me better details about design patterns. I was getting good details but those were in different URL's, I required all the information in one place only so that it will be better to know what all things are there under c++ design patterns.

Below are my necessary things while learning design patterns :

  • Why we need c++ design patterns
  • What is design patterns
  • How they are categorized ( I mean overview we can say)
  • Good approach while implementation of these patterns
  • Pros and cons of design patterns
  • New features in design patterns.

Please folks suggest me good stuff which consist of above mentioned points. Also suggest me , is there any good forum available for design patterns.

Thanks for your suggestions !!!

-Pravin

A: 

Design patterns are not generally specific to one language, so I would suggest you google specific design patterns such as the mediator pattern, facade pattern, etc... There are 23 base patterns.

Really it depends upon your intentions for a program as to what pattern you decide upon. There are many good books out there which discuss each pattern in detail with real life.

Have a read on google books of the original book "design patterns: elements of reusable object oriented software" for am in depth discussion.

JD
A: 

I totally agree with JD that many valuable design patterns aren't language specific.

However, the implementation of patterns is often language specific. I found Alexandrescu's book "Modern C++ Design" very interesting to see how he uses C++ templates to implement generic version of patterns like Singleton, Visitor etc.

Philipp
A: 

Head first design patterns... http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124

Samrat Patil
A: 

In a previous question, I came across sourcemaking, where at least, there is a nice overview of the basic design patterns (and anti-patterns). I don't know of 1 complete design patterns overview, so I guess, I'll check here for a better answer...

stefaanv
+2  A: 

Vince Huston has a sketchy website... but it neatly illustrate implementations of all the Design Patterns mentionned in the GOF book in C++.

Check it out :)

Each pattern is presented with several sections:

  • name (thanks Lou for pointing it out :P)
  • intent
  • problem (that it solves)
  • structure summary (with a nice diagram)
  • discussion
  • structure (with a sketchy diagram)
  • example
  • check-list (so that you know WHEN to apply it)
  • before / after (to see it in action)
  • rules of thumb (comparison with the other patterns, why they differ, how they can be combined)

It's pretty complete and a really handy reference, though once you've groked a pattern, you should be able to come up with an implementation all by yourself, and even throw templates in the mix :)

Matthieu M.
Don't forget "a name" -- it's the most important part. The name helps spread the idea and make it easy to talk about.
Lou Franco
@Lou Franco: right, without a proper name the rest is just a pile of information :)
Matthieu M.