Typical uml diagram for showing events

橙三吉。 提交于 2020-01-24 04:32:06

问题


I have a couple modules. They communicate to each other through events.

What UML diagram would typically be used to show this?

Is there a non uml diagram people use?

Any examples?


回答1:


I think you definitely want a sequence diagram to show all the event interaction between modules in sequence. This is the preferred way to represent sequence of asynchronous messages between components




回答2:


If you want to express the fact that a module A fires an event E that is handled by module B, I suggest a static diagram to show the structure of your architecture.

In particular, I would use a class diagram where I could draw:

  • the modules A and B (classes with a stereotype)
  • the event E (i.e. still a class with the stereotype event)
  • an association named subscribe between B and E
  • an association named publish between A and E.



回答3:


In general you want to use a "behavioral" diagram(s). There are multiple flavors. Which one you choose depends on the intent of what a given diagram wants to convey.

http://www.visual-paradigm.com/product/vpuml/provides/behavioralmodeling.jsp



来源:https://stackoverflow.com/questions/7923455/typical-uml-diagram-for-showing-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!