我如何在图表上表示模块之间的交互
我有 5 个高级模块。我想在一张图表上展示它们如何相互作用。
例如,模块 1 通过接口向模块 2 发送某个数据类。
我该如何表示这一点?
I have 5 high level modules. I want to show how they interact on one diagram.
For example module 1 sends module 2 a certain data class via an interface.
How do I represent this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想查看UML 组件图。它们允许您根据需要描述组件之间的关系提供的接口。接口是类型化的 - 因此您可以捕获跨链接传递的数据类型。
嗯。
You might want to take a look at UML Component Diagrams. They allow you to depict relations among components as required & provided interfaces. The interfaces are typed - so you can capture the data types that pass across the links.
hth.
正如 @sfinnie 所建议的,如果您想专注于显示组件和接口的结构并且仅显示它们如何交互的概述,那么组件图是一个好主意。
作为使用提供/必需接口的替代方法,您可以绘制实体之间的
<>>
关系,并(取决于建模工具)显示沿该连接流动的数据类型。如果您想显示每个交互的更多细节,序列图很有用;它们显示单独的消息及其发生的顺序。您可以在序列图中使用组件和接口。
最后,如果您想提供通信的抽象描述,您可以使用活动图或交互概述图。那么您将不会使用 UML 组件,而是用“发生这种情况,然后发生这种情况,然后可能发生其他情况”来描述交互。这可能最不适合您的情况,但为了完整性我将其包括在内。
As @sfinnie suggested, component diagrams are a good idea, if you want to focus on showing the structures of components and interfaces and only show an overview of how they interact.
As an alternative to using provided/required interfaces, you can draw
<<flow>>
relationships between the entities and (depending on the modelling tool) show the type of data which flows along that connection.If you want to show more details of each respective interaction, sequence diagrams are useful; they show individual messages and the order in which they occur. You can use your components and interfaces in sequence diagrams.
Finally, if you want to provide an abstract description of the communication, you might use an activity diagram or an interaction overview diagram. Then you won't use UML components, but instead describe the interaction in terms of "this happens, followed by that, then maybe the other." This is probably the least good fit for your situation, but I'm including it for completeness.