我会查看 Kathy Sierra 的 Heads First 设计模式。她是 Heads First 系列的创作者。与四人帮书籍相比,它更容易理解(尽管这是一本好书),并且它被设置为教程,而不仅仅是一本谈论它们的书。
I would check out Heads First Design Patterns by Kathy Sierra. She was the person who created the Heads First Series. It's much easier to understand compared to the Gang Of Four Book (although this is a good book), and it's set as a tutorial, and not just a book which talks about them.
The concept of design pattern is actually very easy and quick to understand. What you may have difficulties with is the understanding of individual patterns as some of these can be relatively abstract or complicated and this difficulty may be compounded by attempts to apply a given pattern to a situation where it doesn't really fit. (That's why a key component for a properly defined pattern, as the GoF taught us, is its Applicability section).
A suggestion is to first learn a few, relatively simple / intuitive patterns (say, maybe, Adapter, Facade and Command) and to seek cases where these are applicable or not and to understand how/why they work and how they'd contribute to a better design.
Once such familiarity with simple patterns is achieved, with practice, along with the at-large-understanding of what patterns are and how they should be learned, you can then expand your panoply of patterns (and be sure to use them when appropriate: if you don't use them you loose them!).
The -pardon my pun- pattern discussed above about learning patterns, is better applied to "life-long" interest in software design than to the context of a "major exam next week" as is the case of the OP, never the less the advice may stick as well (depending on the format of the exam):
step back, relax!, and understand what patterns are, as a concept
learn one or two simple patterns, "in depth", do the exercices etc.
skim through the list of patterns expected to be included in the exam, focusing on applicability and on the diagram which shows the interactions of the object/actors in the pattern.
发布评论
评论(5)
我会查看 Kathy Sierra 的 Heads First 设计模式。她是 Heads First 系列的创作者。与四人帮书籍相比,它更容易理解(尽管这是一本好书),并且它被设置为教程,而不仅仅是一本谈论它们的书。
I would check out Heads First Design Patterns by Kathy Sierra. She was the person who created the Heads First Series. It's much easier to understand compared to the Gang Of Four Book (although this is a good book), and it's set as a tutorial, and not just a book which talks about them.
我听说 Head First Design Patterns 这本书在以下方面做得很好如果您遇到问题,让事情变得容易理解。
I've heard that the Head First Design Patterns book does a good job at making things easy to understand if you're having issues.
最简单的方法可能是在 stackoverflow 上搜索。
快速搜索的一些链接
https://stackoverflow.com/questions/105049/what-are-the-best-design-patterns-books-you-have-read
学习/实现设计模式(针对新手)
如何学习设计模式?
正如您在链接中看到的Head First 设计模式 位于所有这些模式的顶部......所以我会选择那个!
The easiest way might be to search at stackoverflow..
Some links on a quick search
https://stackoverflow.com/questions/105049/what-are-the-best-design-patterns-books-you-have-read
Learning/Implementing Design Patterns (For Newbies)
How to study design patterns?
As you can see on the links Head First Design Patterns is at the top on all of them.. so I would go for that one!
设计模式的概念实际上非常容易理解。
您可能遇到的困难是理解各个模式,因为其中一些模式可能相对抽象或复杂,并且尝试将给定模式应用于一种不太适合的情况。 (这就是为什么正确定义模式的关键组件,如 GoF 教给我们的是它的适用性部分)。
建议首先学习一些相对简单/直观的模式(例如,适配器, 外观 和 命令)并寻找这些适用或不适用的案例,并了解它们如何/为何工作以及它们如何有助于更好的设计。
一旦对简单模式有了这样的熟悉,通过实践,以及对模式是什么以及应该如何学习它们的普遍理解,您就可以扩展您的模式全貌(并确保在适当的时候使用它们:如果如果您不使用它们,就会丢失它们!)。
上面讨论的关于学习模式的-请原谅我的双关语-模式,更好地应用于对软件设计的“终身”兴趣,而不是“下周的主要考试”的背景
The concept of design pattern is actually very easy and quick to understand.
What you may have difficulties with is the understanding of individual patterns as some of these can be relatively abstract or complicated and this difficulty may be compounded by attempts to apply a given pattern to a situation where it doesn't really fit. (That's why a key component for a properly defined pattern, as the GoF taught us, is its Applicability section).
A suggestion is to first learn a few, relatively simple / intuitive patterns (say, maybe, Adapter, Facade and Command) and to seek cases where these are applicable or not and to understand how/why they work and how they'd contribute to a better design.
Once such familiarity with simple patterns is achieved, with practice, along with the at-large-understanding of what patterns are and how they should be learned, you can then expand your panoply of patterns (and be sure to use them when appropriate: if you don't use them you loose them!).
The -pardon my pun- pattern discussed above about learning patterns, is better applied to "life-long" interest in software design than to the context of a "major exam next week" as is the case of the OP, never the less the advice may stick as well (depending on the format of the exam):
您可以从这里开始简单的文章,但对初学者有好处
http: //www.codeproject.com/Articles/28309/Design-pattern-FAQ-Part-1-Training
You can start from here simple article but good for beginners
http://www.codeproject.com/Articles/28309/Design-pattern-FAQ-Part-1-Training