开发者

Examples of Design Patterns used in FOSS [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I've read a lot of good things written about design patterns but am yet to actually look at things in detail. To me, design patterns is just a fancy name for data structures and algorithms. Before I invest any time in more reading, I'd like to see some good examples of design patterns working in real life.

What good开发者_开发百科 examples of design patterns can I find in well-known open source projects?

C++ preferred.

Update: I see the close votes and downvotes. These were expected. If there is an alternative post with answers to my question, please lead me to it. At least leave a reason as to why this post doesn't belong here.


It appears you did not invest enough time into design patterns to truly grasp what they are. I encourage you to read more, because design patterns are not a fancy name for data structures and algorithms; there is barely any link between algorithms and design patterns. Design patterns are "recipes" that help you organize classes and their relationships in a way that makes them easier to reuse.

As for examples, no need to look very far: the STL collection iterators are implementations of the iterator pattern.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜