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

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

我目前的理解是:

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

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


当前回答

...long time ago in a faraway place philosophers worried about the distinction between the one and the many. Architecture is about relationship, which requires the many. Architecture has components. Design is about content, which requires the one. Design has properties, qualities, characteristics. We typically think that design is within architecture. Dualistic thinking gives the many as primordial. But architecture is also within design. It's all how we choose to view what is before us - the one or the many.

其他回答

设计:了解模块,模块之间的关系,每个模块的功能,类及其成员函数,每个模块之间通信的接口。

体系结构:体系结构是软件系统的整个结构。所有模块、类和组件执行不同的任务,并将给出唯一的结果。

例如:有一个有5个房间的房子。还有附属浴室。厨房也在家里。所以家里有不同的东西这些东西之间有不同的关系。所以这一切都是关于一个家的“设计”。

而当你从房子外面看的时候,你看到的整个结构都是关于建筑的。

Good question... Although the line between them is hardly a bright sharp line, imho, if you are using both terms, then Architecture encompasses more technical or structural decisions about how to build or construct something, especially those decisions that will be hard (or harder) to change once implemeneted, whereas Design encompasses those decisions that either are easy to change later (like method names, class <-> file organizational structure, design patterns, whether to use a singleton or a static class to solve some specific problem, etc. ) and/or those that effect the appearance or esthetic aspects of a system or application (Human Interface, ease of use, look and feel, etc.)

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

我的提醒:

我们可以不征求别人的意见就改变设计 如果我们改变架构,我们需要将其传达给某人(团队、客户、涉众……)

架构设计的基本原理来自于各种因素,其中最重要的是非功能性需求,比如可伸缩性,当然最重要的是经验。没有了理论基础,你就只剩下平淡的模式,或者怎么做。无论是在更高的层次上还是在类的层次上,它仍然是设计。

或者换句话说

架构是元设计,即设计设计。您有一些已知的模式适合某个解决方案空间,您会选择哪个,为什么?架构是当你回答“是哪个”和“为什么”时(“如何”已经在设计中给出了)。它当然不依赖于抽象级别,例如实现分布式会话不是一个类级别的任务,但是对于给定的体系结构有一些设计可供选择。

同样,体系结构也反映在类级设计中。在可伸缩的体系结构下,如果不考虑可伸缩性因素,类设计通常是不同的。为什么你必须有一个方法“BeginAsyncUpload”而不是“Upload”是一个架构决策。

有趣的是,当我们将注意力转移到更高层次的系统元素时,“哪个和为什么”问题变得更加重要,而“如何”变得不那么相关。从另一个方向来看,“如何”部分变得更加重要,这也是因为重复使用使得它变得很明显,例如,在抽象工厂和原型之间进行选择。