Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detail learning of c++ design patterns [closed]

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

like image 726
pravin Avatar asked Oct 16 '10 07:10

pravin


2 Answers

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 :)

like image 179
Matthieu M. Avatar answered Oct 04 '22 07:10

Matthieu M.


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.

like image 31
Philipp Avatar answered Oct 04 '22 06:10

Philipp