开发者

Detail learning of c++ design patterns [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questi开发者_Go百科ons seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 5 years ago.

Improve this question

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


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


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.


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...


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜