软件结构与软件架构 [英] Software structure versus Software architecture

查看:27
本文介绍了软件结构与软件架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法准确区分软件结构和软件架构

I can't get the precise differences between software structure and software architecture

一个简单的例子解释精确的差异将非常感激

A simple example explains the precise differences would be very appreciated

顺便说一句,我使用 UML 来表示架构

BTW,I use UML for representing architecture

推荐答案

它们之间的软件架构和软件结构重叠.

Software architecture and Software structure overlap between them.

软件架构是一组与软件系统相关的重要方面和决策(简单地说).它包括最重要的需求和各种限制(性能、安全等),然后是高层系统组织、系统各部分之间的主要通信机制、外部依赖、实现技术和指南,甚至风险等,等等等等

Software architecture is a set of important aspects and decisions in relation to a software system (simply said). It includes the most important requirements and all kind of restrictions (performance, security, etc.), then the high-level system organization, the principal communication mechanisms between the system parts, external dependencies, implementation technologies and guidlines, even risks, etc, etc, etc.

我曾经读过一篇关于软件架构的精彩陈述:这是一组难以改变的决策.

I read once a great statement about the software architecture: it's a set of decisions, which are hard to change.

因此,当您不确定某个方面/决策是否真的与建筑相关时,请问问自己 - 如果我稍后更改此方面/决策,会产生什么影响?改变它有多难?

So, when you are not sure if an aspect/decision is really architectonic relevant, just ask yourself - if I later change this aspect/decision, what is the impact? How hard it to change it?

示例:

  • 假设我们要将客户端-服务器系统结构更改为 3-Tier.这种重组有多难?嗯,可能很难.因此,这是一个建筑方面的问题.
  • 我们想要改变 XML 和 JSON 之间的通信.如果设计不当,这可能会非常复杂,因此我们会谨慎对待,并将其视为架构要求.
  • 如果我们想更改方法中的排序算法怎么办.这种变化很可能是本地化的,而且成本并不高.因此,这不是建筑方面的问题.
  • 更改系统的某些核心模块的 API 定义,这些模块被许多其他模块和系统使用,很可能是一个架构主题.

软件结构 另一方面,实际上是一种系统设计,可以非常高级(如显示主要模块或层的框图)直到非常详细(代码蓝图).

Software structure on the other hand is practically a system design, and can be very high-level (like block-diagram that shows the main modules or tiers) till very detailed (blueprint of code).

这种软件结构的高级视图肯定是软件架构的一部分,而详细设计则不是(可能是一些重要的部分).

This high-level view of the software structure would definitelly be part of the software architecture, while detailed design not (maybe some important parts).

更新(评论后)

1#关于强烈推荐用于软件的图表的任何提示体系结构和软件结构?因为这听起来是一类两种情况都应该使用图表(架构和结构)

1#Any hints about which diagram is highly recommended for Software architecture and software structure?because it sounds that class diagram should be used in both cases (architecture and structure)

重要的不是要制作哪个 UML 图,而是要显示的内容、哪个方面.

It's not about which UML diagram to make, but rather what is important to show, which aspect.

因此,所有图表都可以用来描绘建筑方面.然而,最常见且可能是强制性的图是组件图.它自然地展示了系统模块及其相互连接方式的高级设计.它可以选择通过部署视图进行扩展.类图用于显示组件的内部结构,通过表示或多或少详细的类结构和关系.并非所有的类图都与架构相关,但有些可能确实如此(问问你自己......":))

All diagrams could be therefore used to depict an architectonic aspect. Most common however and probably mandatory diagram is component diagram. It naturally shows the high-level design in terms of system modules and the way they interface each other. It can be optionally extended by a deployment view. Class diagram is used to show the internal structure of the components, by representing more or less detailed class structure and relationships. Not all class diagrams are architectonic relevants, but some can definitelly be so ("ask yourself..." :))

还有许多其他潜在的重要方面,例如系统行为.您可以使用UML 序列、状态机、活动 等.其中一些构建了架构,其他一些不太重要,但也很有用.

There are lots of other potentialy important aspects, like system behavior. Hier you can use UML sequences, state machines, activities and so on. Some of those build up the architecture, others are less significant, but also usefull to show.

2#据我了解,详细设计不是一部分建筑/结构设计,但我可以使用相同类型的UML 图,例如类和序列图(用于体系结构和结构)具有更详细的信息.对吗?

2#As I understand from the answer that the detailed design is not part of architecture/structure design but I can use for it the same type of UML diagrams such as class and sequence diagram (that is used in architecture and structure )with more detailed information. right?

如前所述,这与图表本身的类型无关,而与显示的内容有关.所以,如果你认为内容是相关的,你就把它放在架构下.如果不是,则将其视为详细设计.

As told, it's not about the type of diagram itself, but about the displayed content. So, if you consider that content is relevant, youput it under architecture. If not, it is considered as a detailed design.

示例:可以显示一个序列以显示与外部设备的关键实时通信.尽管它可以是非常低级的,但它对于满足重要要求可能是基础.相同类型的图表可用于显示不那么重要的本地算法或用例场景,因此不是架构的一部分.

Example: a sequence can be shown to show a critical real-time communication with an external device. Although it can be very low-level, it can be fundamental for the fullfillment of an important requirement. The same type of diagram can be used to show a local algorithm or a use case scenario which is not so important, therefore not part of the architecture.

3#高层设计是否与架构设计相同

3#Does the high level design is the same as Architectural design

你可以这么说.但请记住,建筑学和非建筑学之间没有明确的界限.有时这是主观的,关键不在于正确区分它们,而在于建立一个良好的规范,这将导致成功的产品开发.

You can say so. Keep in mind though that there is no clear frontier between architectonic and not architectonic. It is sometimes subjective, and the point is not to correctly separate between those, but rather to build up a good specification which would lead to a successful product development.

这篇关于软件结构与软件架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆