有人能解释一下软件设计和软件架构的区别吗?

更具体地说;如果你让别人给你展示“设计”——你希望他们展示什么?“建筑”也是如此。

我目前的理解是:

设计:系统特定模块/部分的UML图/流程图/简单线框(用于UI) 架构:组件图(显示系统的不同模块如何相互通信以及如何与其他系统通信),要使用什么语言,模式……?

如果我说错了,请指正。我提到了维基百科在http://en.wikipedia.org/wiki/Software_design和http://en.wikipedia.org/wiki/Software_architecture上有文章,但我不确定我是否理解正确。


当前回答

这个问题没有明确的答案,因为“软件架构”和“软件设计”有相当多的定义,而且都没有一个规范的定义。

一个很好的思考方法是Len Bass, Paul Clements和Rick Kazman的声明,“所有的架构都是设计,但并不是所有的设计都是架构”[软件架构实践]。我不确定我是否完全同意这一点(因为架构可以包括其他活动),但它抓住了架构是处理设计的关键子集的设计活动的本质。

我的稍微轻率的定义(在SEI定义页面上找到)是,它是一组决策,如果做出错误的决定,将导致项目被取消。

A useful attempt at separating architecture, design and implementation as concepts was done by Amnon Eden and Rick Kazman some years ago in a research paper entitled "Architecture, Design, Implementation" which can be found here: http://www.sei.cmu.edu/library/assets/ICSE03-1.pdf. Their language is quite abstract but simplistically they say that architecture is design that can be used in many contexts and is meant to be applied across the system, design is (err) design that can be used in many contexts but is applied in a specific part of the system, and implementation is design specific to a context and applied in that context.

So an architectural decision could be a decision to integrate the system via messaging rather than RPC (so it's a general principle that could be applied in many places and is intended to apply to the whole system), a design decision might be to use a master/slave thread structure in the input request handling module of the system (a general principle that could be used anywhere but in this case is just used in one module) and finally, an implementation decision might be to move responsibilities for security from the Request Router to the Request Handler in the Request Manager module (a decision relevant only to that context, used in that context).

我希望这能有所帮助!

其他回答

如果有人建造了一艘船,那么发动机、船体、电路等将是他的“建筑元素”。对他来说,发动机制造将是“设计工作”。

如果他将引擎的构建委托给另一个团队,他们将创建一个“引擎架构”……

这取决于抽象和细节的程度。一个人的建筑可能是另一个人的设计!

在我看来,架构只不过是一个愿景,以正确的方式收集需求并构建构建块

在设计中,构建特定的块可能有100种解决方案,但为了满足具体的要求,我们需要选择正确的方法,所以选择正确的方法或算法不是设计吗

另外,请参考: http://en.wikipedia.org/wiki/4%2B1_Architectural_View_Model

我喜欢Roy Thomas Fielding在他的论文中对什么是软件架构的定义和解释: 架构风格与基于网络的软件架构设计

软件体系结构是软件系统在其操作的某个阶段的运行时元素的抽象。一个系统可能由许多抽象层次和许多操作阶段组成,每一个都有自己的软件体系结构。

他强调“运行时元素”和“抽象层次”。

软件架构“关注的问题是……超出了计算的算法和数据结构。

架构特别不是关于实现的细节(例如,算法和数据结构)。体系结构设计包含了比OOD(面向对象设计)通常提供的更丰富的抽象集合。

设计涉及到设计元素的模块化和详细接口,它们的算法和过程,以及支持体系结构和满足需求所需的数据类型。

“建筑”经常被用作“设计”的同义词(有时前面带有形容词“高级”)。许多人使用术语“架构模式”作为“设计模式”的同义词。

查看这个链接。

定义术语体系结构、设计和实现