最近準(zhǔn)備翻譯一個不錯的架構(gòu)研究系列:The Architecture of Open Source Applications 。對架構(gòu)感興趣的童子可以關(guān)注一下,或者對英語學(xué)習(xí)感興趣也可以。全書兩大卷,包含了40多個經(jīng)典開源項(xiàng)目的架構(gòu)解析,參與人員大多都是一線主力開發(fā)者。
??閑言少敘,獻(xiàn)上序言如下:
??Carpentry is an exacting craft, and people can spend their entire lives learning how to do it well. But carpentry is not architecture: if we step back from pitch boards and miter joints, buildings as a whole must be designed, and doing that is as much an art as it is a craft or science.
木工是一門要求嚴(yán)格的工藝,人們可以花一輩子的時間學(xué)習(xí)如何把它做好。但木工不是建筑學(xué):如果我們從木板搭帳篷和接縫銜接中抽身來看,建筑必須作為一個整體被設(shè)計。這樣做是一門工藝或科學(xué)也是一門藝術(shù)。
Programming is also an exacting craft, and people can spend their entire lives learning how to do it well. But programming is not software architecture. Many programmers spend years thinking about (or wrestling with) larger design issues: Should this application be extensible? If so, should that be done by providing a scripting interface, through some sort of plugin mechanism, or in some other way entirely? What should be done by the client, what should be left to the server, and is "client-server" even a useful way to think about this application? These are not programming questions, any more than where to put the stairs is a question of carpentry.
編程也是一門要求嚴(yán)格的工藝,人們可以窮其畢生精力學(xué)習(xí)如何把它做好。但編程并不是軟件架構(gòu)。許多程序猿花費(fèi)數(shù)年思考(或斟酌)更重要的設(shè)計問題:這個應(yīng)用程序可以被擴(kuò)展嗎?如果可以,應(yīng)該做一個腳本界面,通過某種插件機(jī)制或者其它方法來完成?客戶端應(yīng)該做什么,應(yīng)該在服務(wù)器端做什么,對于這個應(yīng)用程序“客戶端-服務(wù)器”是一個好的實(shí)現(xiàn)方式嗎?這些都不是編程問題。
Building architecture and software architecture have a lot in common, but there is one crucial difference. While architects study thousands of buildings in their training and during their careers, most software developers only ever get to know a handful of large programs well. And more often than not, those are programs they wrote themselves. They never get to see the great programs of history, or read critiques of those programs' designs written by experienced practitioners. As a result, they repeat one another's mistakes rather than building on one another's successes.
建筑架構(gòu)和軟件架構(gòu)有很多共通之處,但有一個關(guān)鍵的區(qū)別。在培訓(xùn)和職業(yè)生涯期間,建筑師會研究成千上萬的建筑物,而大多數(shù)軟件開發(fā)者只了解少數(shù)自己親身經(jīng)歷的大型程序。他們從來沒有了解過大程序的歷史,或閱讀評論那些經(jīng)驗(yàn)豐富的從業(yè)者的設(shè)計和實(shí)現(xiàn)。結(jié)果,他們重復(fù)對方的錯誤而不是建立在彼此的成功。
This book is our attempt to change that. Each chapter describes the architecture of an open source application: how it is structured, how its parts interact, why it's built that way, and what lessons have been learned that can be applied to other big design problems. The descriptions are written by the people who know the software best, people with years or decades of experience designing and re-designing complex applications. The applications themselves range in scale from simple drawing programs and web-based spreadsheets to compiler toolkits and multi-million line visualization packages. Some are only a few years old, while others are approaching their thirtieth anniversary. What they have in common is that their creators have thought long and hard about their design, and are willing to share those thoughts with you. We hope you enjoy what they have written.
這本書是我們改變這種局面的嘗試。每一章描述了一個開源程序的架構(gòu):它是如何構(gòu)建的,各部分如何交互,為什么這樣構(gòu)成,還有吸取的教訓(xùn)(這些教訓(xùn)也適用于其它項(xiàng)目的重要的設(shè)計問題)。這些描述由懂得最好軟件的人所寫,他們擁有幾年或幾十年的設(shè)計和重構(gòu)復(fù)雜應(yīng)用程序的經(jīng)驗(yàn)。從簡單的繪圖程序程序和基于web的電子表格到編譯器工具集和數(shù)百萬行的可視化軟件包。有些只有幾年歷史,有的則接近三十年。他們的共同點(diǎn)是,他們的創(chuàng)作者都經(jīng)過漫長而艱難的設(shè)計,并且都愿意和你分享這些想法。我們希望你喜歡他們所寫的。
生詞:
carpentry ['ka:p?ntri] : n.木器;木工工藝;木工業(yè)
craft [kra:ft] : n.工藝;手藝;太空船
architecture ['ɑ?k?tekt??] : n.建筑學(xué);建筑風(fēng)格;架構(gòu)
pitch [p?t?] : n.瀝青;樹脂;球場
miter ['ma?t?] : n.斜接
wrestling ['resli?] :n. v.摔跤;扭斗 wrestling with :為......絞盡腦汁;受困于.......
plugin [pl?g?n] : n.插件
mechanism ['m?k?n?z?m] : n.機(jī)制;原理;
crucial ['kuru:??l] : adj.重要的
more often than not : 往往
critiques [kri'ti:ks] vt.評論;批判
lessons : n.經(jīng)驗(yàn)教訓(xùn);課程
spreadsheets : n.電子表格
approaching : v.接近
anniversary [,?ni'v?:s?ri] : 周年紀(jì)念日