在第四部分中,Bill和Erich討論了設(shè)計(jì)模式如何與解決問題相配對,設(shè)計(jì)模式如何幫助你理解問題解決得意圖,以及如何通過練習(xí)成為一個好的設(shè)計(jì)師。
[Update: 一些心得]:
如何成為一個好的設(shè)計(jì)師?理解這些設(shè)計(jì)模式是不夠的,僅僅只讀完了GoF這本書也是不夠的。還需要做甚呢?你需要練習(xí),需要看代碼,看其它好的設(shè)計(jì)師是如何設(shè)計(jì)系統(tǒng)的。
In addition to reading books, you need to read and understand lots of code, see how existing systems solve a particular problem and what experienced designers did. Basically what design patterns do is to tell you what these developers have done. But, just reading about it isn't enough. You become a master by mimicking the work of excellent developers. ….. Not only do you learn about a particular development process you will also learn how to communicate about a design in a group of developers. As a good designer you not only come up with good designs you also communicate and defend them. You have to practice, like an apprentice in a way. Over time you'll become as experienced as experienced designers.
作為一個新手,就算理解了GoF中的所有設(shè)計(jì)模式,也還是不夠的,重要的,要知道,在什么時(shí)候,什么情況下,使用什么樣的patterns。 而這往往是非常難的。 通常只有完成了之后,仔細(xì)思考自己的設(shè)計(jì)和代碼的時(shí)候才會發(fā)現(xiàn)需要使用某個模式,或者某一種模式使用錯了。 這個時(shí)候,就需要使用“重構(gòu)”技術(shù),來應(yīng)用你覺得正確的模式。 只有練習(xí)再練習(xí)。
記住這句話:look to the master, follow the master, walk with the master, see through the master, become the master…