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

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

我目前的理解是:

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

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


当前回答

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.)

其他回答

在SDLC(软件开发生命周期)的一些描述中,它们是可互换的,但共识是它们是不同的。它们同时是:不同的(1)阶段,(2)责任领域,(3)决策层次。

架构是更大的图景:框架、语言、范围、目标和高级方法(Rational、瀑布式、敏捷等)的选择。 设计是更小的画面:如何组织代码的计划;系统不同部分之间的契约将会是怎样的;项目方法和目标的持续实施。规范是在这个阶段编写的。

由于不同的原因,这两个阶段似乎融合在一起。

Smaller projects often don't have enough scope to separate out planning into these to stages. A project might be a part of a larger project, and hence parts of both stages are already decided. (There are already existing databases, conventions, standards, protocols, frameworks, reusable code, etc.) Newer ways of thinking about the SDLC (see Agile methodologies) somewhat rearrange this traditional approach. Design (architecture to a lesser extent) takes place throughout the SDLC on purpose. There are often more iterations where the whole process happens over and over. Software development is complicated and difficult to plan anyway, but clients/managers/salespeople usually make it harder by changing goals and requirements mid-stream. Design and even architectural decisions must bemade later in the project whether that is the plan or not.

Even if the stages or areas of responsibility blend together and happen all over the place, it is always good to know what level of decision-making is happening. (We could go on forever with this. I'm trying to keep it a summary.) I'll end with: Even if it seems your project has no formal architectural or design stage/AOR/documentaiton, it IS happening whether anyone is consciously doing it or not. If no one decides to do architecture, then a default one happens that is probably poor. Ditto for design. These concepts are almost more important if there are no formal stages representing them.

当您需要将较高体系结构级别识别的业务和功能投射到应用程序中时,软件体系结构最好用于系统级。

例如,你的业务是关于交易员的“盈亏”,你的主要功能涉及“投资组合评估”和“风险计算”。

但是当软件架构师详细描述他的解决方案时,他会意识到:

“投资组合评估”不能只是一个应用程序。它需要在可管理的项目中进行细化,例如:

GUI 发射器 调度程序 ...

(因为涉及的操作太大了,需要在几台计算机之间进行拆分,同时仍然可以通过一个通用的GUI随时监控)

软件设计将检查不同的应用程序,它们的技术关系和内部子组件。 它将产生最后一个体系结构层(“技术体系结构”)工作所需的规范(根据技术框架或横向组件),以及项目团队(更面向业务功能的实现)开始各自的项目所需的规范。

架构是“难以改变的设计决策”。

在使用TDD之后,这实际上意味着你的设计一直在变化,我经常发现自己在这个问题上挣扎。上面的定义摘自Martin Fowler的《企业应用程序体系结构模式》

这意味着架构依赖于你的系统的语言、框架和领域。如果你能在5分钟内从Java类中提取出一个接口,这就不再是架构决策了。

建筑与设计密切相关;它们之间的主要区别在于我们面对的方向。 建筑面向战略、结构和目的,面向抽象。 设计面向实现与实践,面向具体。

我非常喜欢这篇文章,因为它提供了将建筑与设计分开的经验法则:

http://www.eden-study.org/articles/2006/abstraction-classes-sw-design_ieesw.pdf

这被称为内涵/局部性假说。关于软件性质的非本地和内涵的陈述是架构性的。局部的和内涵的语句是设计的。