Think of GOF (commonly known as Gang of Four) as a bible

Think of GOF (commonly known as Gang of Four) as a bible

Andy.Song IT Haha
I am very envious of several design patterns. This book has influenced the entire IT industry with an unparalleled momentum of other books. If you haven't read "Design Patterns" and don't remember the name or guidelines of the pattern, you may not pass the interview. It is hoped that such errors can be gradually improved.

  不要误解我,这本书本身是没有问题的。问题出在人们如何解释以及使用它。下面是通常场景:
1.架构师马克,拿到这本书开始阅读。他觉得这本书牛逼坏了!
2.马克趁热打铁开始阅读现在工作的代码。
3.马克选择了一种设计模式并应用到了代码当中。
4.随后马克把这本书推荐给了那些跟他重复同样步骤的资深开发者。

 结果就是一团糟。
 如何正确使用这本书实际上已经在导读中做了清晰的说明(提醒那些不看导读的人)——“在过去你有个问题,而且这个问题总是一遍又一遍地困扰着你”。注意到其中的顺序了吗?先有一个问题,然后查看这本书之后找到对应的解决方案。

不要掉进看这本书的陷阱当中——“找到一个方案然后尝试把它应用在自己的的代码中。尤其要注意的是,一些书中描述的模式在现实当中已经不再正确。”

Guess you like

Origin blog.51cto.com/15061944/2593714