最近准备翻译一个不错的架构研究系列:The Architecture of Open Source Applications 。对架构感兴趣的童子可以关注一下,或者对英语学习感兴趣也可以。全书两大卷,包含了40多个经典开源项目的架构解析,参与人员大多都是一线主力开发者。
闲言少叙,献上序言如下:
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.
木工是一门要求严格的工艺,人们可以花一辈子的时间学习如何把它做好。但木工不是建筑学:如果我们从木板搭帐篷和接缝衔接中抽身来看,建筑必须作为一个整体被设计。这样做是一门工艺或科学也是一门艺术。
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.
编程也是一门要求严格的工艺,人们可以穷其毕生精力学习如何把它做好。但编程并不是软件架构。许多程序猿花费数年思考(或斟酌)更重要的设计问题:这个应用程序可以被扩展吗?如果可以,应该做一个脚本界面,通过某种插件机制或者其它方法来完成?客户端应该做什么,应该在服务器端做什么,对于这个应用程序“客户端-服务器”是一个好的实现方式吗?这些都不是编程问题。
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.
建筑架构和软件架构有很多共通之处,但有一个关键的区别。在培训和职业生涯期间,建筑师会研究成千上万的建筑物,而大多数软件开发者只了解少数自己亲身经历的大型程序。他们从来没有了解过大程序的历史,或阅读评论那些经验丰富的从业者的设计和实现。结果,他们重复对方的错误而不是建立在彼此的成功。
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.
这本书是我们改变这种局面的尝试。每一章描述了一个开源程序的架构:它是如何构建的,各部分如何交互,为什么这样构成,还有吸取的教训(这些教训也适用于其它项目的重要的设计问题)。这些描述由懂得最好软件的人所写,他们拥有几年或几十年的设计和重构复杂应用程序的经验。从简单的绘图程序程序和基于web的电子表格到编译器工具集和数百万行的可视化软件包。有些只有几年历史,有的则接近三十年。他们的共同点是,他们的创作者都经过漫长而艰难的设计,并且都愿意和你分享这些想法。我们希望你喜欢他们所写的。
生词:
carpentry ['ka:pəntri] : n.木器;木工工艺;木工业
craft [kra:ft] : n.工艺;手艺;太空船
architecture ['ɑːkɪtektʃə] : n.建筑学;建筑风格;架构
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.机制;原理;
crucial ['kuru:ʃəl] : adj.重要的
more often than not : 往往
critiques [kri'ti:ks] vt.评论;批判
lessons : n.经验教训;课程
spreadsheets : n.电子表格
approaching : v.接近
anniversary [,æni'və:səri] : 周年纪念日