时间图与交互图比较
 

2009-01-12 作者:Kim Hamilton, Russell Miles 来源:网络

 
Table 8-1. Comparing sequence and communication diagrams
表8-1. 时间图与交互图比较
Feature
特征
Sequence diagrams
时间图
Communication diagrams
交互图
The result
比较结果
Shows participants effectively

有效的显示参与者
Participants are mostly arranged along the top of page, unless the drop-box participant creation notation is used. It is easy to gather the participants involved in a particular interaction.

如果没有使用构建符号时,参与者被排列在图顶层。很容易知道所有有联系的参与者。
Participants as well as links are the focus, so they are shown clearly as rectangles.

参与者被连成链状,在小范围区域内既可清楚的知道参与者间的联系。
Communication diagrams barely win. Although both types of diagram can show participants as effectively as each other, it can be argued that communication diagrams have the edge since participants are one of their main focuses.

交互图有些许优势,虽然两者都能有效的显示参与者间的关系,但交互图是以参与者为中心的。
Showing the links between participants

显示参与者间的联系
Links are implied. If a message is passed from one participant to another, then it is implied that a link must exist between those participants.

联系很隐晦。如果在两个参与者间有消息传递,即暗指两个参与者间有联系。
Explicitly shows the links between participants. In fact, this is the primary purpose of these types of diagram.

很清楚的显示了参与者间的联系,事实上,交互图的目的就是为了描述这种联系。
Communication diagrams win because they explicitly and clearly show the links between participants.

交互图有优势,因为它可以清楚明白的显示参与者间的关系。
Showing message signatures

显示消息
Message signatures can be fully described.

消息能够被完整的描述。
Message signatures can be fully described.

消息能够被完整的描述。
Draw! Both types of diagram can show messages as effectively as each other.

尽管去画,两种图都是有效的。
Supports parallel messages

显示并行信息
With the introduction of sequence fragments, sequence diagrams are much better.

使用时间小片断可以很好的显示并行信息。
Shown using the number-letter notation on message sequences.

使用数字-字母符号可以显示并行信息
Draw! Both types of diagram show parallel messages equally well.

尽管去画,两种图都是有效的。
Supports asynchronous messages (fire and forget)

支持异步信息
Achieved using the asynchronous arrow.

使用异步箭头完成
Communication diagrams have no concept of the asynchronous message since its focus is not on message ordering.

交互图并不关心异步信息传递,在交互图中没有异步的概念。
Sequence diagrams are a clear winner here because they explicitly support asynchronous messages.

时间图有明显优势,非常好的支持了异步信息。
Easy to read message ordering

信息顺序表达
This is a sequence diagram's forté. Sequence diagrams clearly show message ordering using the vertical placement of messages down the diagram's page.

这是一个时间图的特点。 时间图明确显示采用垂直图形清楚的现实了信息的顺序。
Shown using the number-point-nested notation.

使用数字字母组合符号显示。
Sequence diagrams are a clear winner here since they really show off message ordering clearly and effectively.

时间图清楚明白的显示了消息的顺序。
Easy to create and maintain the diagram

容易建立和维护
Creating a sequence diagram is fairly simple. However, maintaining sequence diagrams can be a nightmare unless a helpful UML tool is being used.

建立时间图是容易的,但是没有好的UML工具的话,维护时间图将是个恶梦。
Communication diagrams are simple enough to create; however, maintenance, especially if message numbering needs to be changed, still ideally needs the support of a helpful UML tool.

交互图很容易建立,但如果涉及到信息编号的话还是需要借助于一个好用的UML工具。
This is a difficult one to judge and is largely based on personal preference. However, communication diagrams do have the edge on the ease-of-maintenance stakes.

根据个人喜好,两种图优势表现不同。

火龙果软件/UML软件工程组织致力于提高您的软件工程实践能力,我们不断地吸取业界的宝贵经验,向您提供经过数百家企业验证的有效的工程技术实践经验,同时关注最新的理论进展,帮助您“领跑您所在行业的软件世界”。
资源网站: UML软件工程组织