具有依赖关系的程序集和接口之间的uml组件图差异 [英] uml component diagram difference between assembly and interfaces with dependency
问题描述
有人可以解释图中标记的元素之间的区别吗? 我认为这仅取决于我们要连接多少个接口.我说的对吗?
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 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 :)):
- 程序集项目代码"和客户详细信息"无法连接两个组件(仅它们的实例)
- 订单和帐户之间的依存关系指向错误(应该从到提供的名称 界面使用相同的名称)
- Assemblies "Item Code" and "Customer Details" cannot connect two components (only their instances)
- Dependency between Order and Account is in wrong direction (should go from required to provided interface with the same name)
注意:我必须说,即使在语义上,该图看起来也极其可疑.您可能应该重新考虑.
Note: I must say that this diagram looks extremelly suspicious even semantically. You should probably reconsider it.
这篇关于具有依赖关系的程序集和接口之间的uml组件图差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!