Chapter Two. Communication and the Use of Language
A project faces serious problems when its language is fractured. Domain experts use their
jargon while technical team members have their own language tuned for discussing the domain
in terms of design.
The terminology of day-to-day discussions is disconnected from the terminology embedded in
the code (ultimately the most important product of a software project). And even the same
person uses different language in speech and in writing, so that the most incisive
expressions of the domain often emerge in a transient form that is never captured in the
code or even in writing.
Translation blunts communication and makes knowledge crunching anemic.
Yet none of these dialects can be a common language because none serves all needs.
???????? 當(dāng)用于交流的語言出現(xiàn)斷層的時候,項目將會面臨一系列嚴(yán)重的問題。域?qū)<覀兣c技術(shù)團隊自
說自話。
??????? 日常討論所用的術(shù)語不再與代碼(它們會成為軟件項目的重要部分)中的術(shù)語相聯(lián)系。甚至同
一個人會在交流中和在記錄中所用的術(shù)語不相一致,以至于問題域中那些重要的表達方式出現(xiàn)得如此短
暫進而使它們無法被捕獲到代碼中去甚至無法被記錄下來。
Use the model as the backbone of a language. Commit the team to exercising that language
relentlessly in all communication within the team and in the code. Use the same language in
diagrams, writing, and especially speech.
Iron out difficulties by experimenting with alternative expressions, which reflect
alternative models. Then refactor the code, renaming classes, methods, and modules to
conform to the new model. Resolve confusion over terms in conversation, in just the way we
come to agree on the meaning of ordinary words.
Recognize that a change in the UBIQUITOUS LANGUAGE is a change to the model.
Domain experts should object to terms or structures that are awkward or inadequate to
convey domain understanding; developers should watch for ambiguity or inconsistency that
will trip up design.
??????? 把模型作為通用語言的核心。推動整個團隊在各種各樣的交流中以及在編碼中嚴(yán)格的實踐這種
語言。在圖表、記錄特別是談話中統(tǒng)一交流方式。
??????? 通過選擇性的表達方式,即那些對應(yīng)不同模型的表達方式來消除通用語言中的難點。然后重構(gòu)
代碼,重新命名那些類、方法模塊,使它們和新的模型相一致。我們對那些常用詞匯的理解漸漸的達成
一致,并以此來解決交談期間的那些混淆。
??????? 要知道,對于通用語言的任何變化都是對模型的變化。
?????? 域?qū)<覀儜?yīng)當(dāng)積極反對那些尷尬的或者不能充分傳達域概念的術(shù)語,開發(fā)者應(yīng)當(dāng)時時留意含義不
明確或者有矛盾的地方,這些地方會給設(shè)計埋下隱患。
Play with the model as you talk about the system. Describe scenarios out loud using the
elements and interactions of the model, combining concepts in ways allowed by the model.
Find easier ways to say what you need to say, and then take those new ideas back down to
the diagrams and code.
??????? 當(dāng)你談?wù)撓到y(tǒng)的時候,多多使用模型。大聲地使用模型所提供的那些元素和交互方式描述情節(jié)
,以模型所接受的方式聯(lián)結(jié)域中的概念。盡可能簡單的表達你所要表達的東西,然后反過頭來把這些思
路轉(zhuǎn)變?yōu)閳D表和代碼。
posted on 2006-08-29 21:25
littlegai 閱讀(205)
評論(0) 編輯 收藏 引用 所屬分類:
我的讀書筆記