uml组件图有依赖的程序集和接口之间的区别 [英] uml component diagram difference between assembly and interfaces with dependency

查看:21
本文介绍了uml组件图有依赖的程序集和接口之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释图中标记的元素之间的区别吗?我认为这仅取决于我们要连接多少个接口.我说的对吗?

Can someone explain in what's the difference between elements marked in diagram? I think it only depends on how many interfaces we want to connect. Am I right?

http://i.imgur.com/ZnW02Ar.png

推荐答案

你说的不对,图表语法不正确.

You are not right and the diagram is syntactically incorrect.

让我先解释一下这些概念及其含义:

Let me first explain the concepts and their meaning:

依赖存在于定义级别(图表的顶部).它们可以在所需和提供的接口之间、组件和接口之间,甚至在两个组件(无接口)之间绘制,具体取决于我们想要显示的内容.

Dependency between components exist on the definition level (top part of the diagram). They can be drawn between the required and provided interface, between a component and interface or even between two components (no interfaces), depending on what we want to show.

Assembly 是完全不同的关系,在定义级别(组件之间)没有意义.这是因为它是一种特殊的链接——在运行时建立的两个分类器实例之间的关系(这里是组件,下图).

Assembly is completelly different relationship and it does not make sense on the definition level (between components). It's because it is a special kind of link - a relationship established in run-time between two instances of a classifier (here - component, the lower diagram).

因此,总而言之,我们可以说分类器级别上两个组件之间的依赖关系表示运行时相应实例之间的潜在链接或组合.

So, in summary we could say that a dependency between two components on classifier level expresses a potential link or assembly between the corresponding instances in run-time.

在你的例子中有几个语法错误(如果你可以编译它,它会给你这个报告:)):

On your example there are several syntax errors (if you could compile it, it would give you this report :)):

  • 程序集项目代码"和客户详细信息"无法连接两个组件(仅连接它们的实例)
  • 订单和帐户之间的依赖关系方向错误(应该从必需变为提供 接口同名)

注意:我必须说这张图看起来非常可疑,甚至在语义上也是如此.您可能应该重新考虑它.

Note: I must say that this diagram looks extremelly suspicious even semantically. You should probably reconsider it.

这篇关于uml组件图有依赖的程序集和接口之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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