What's the best way to represent a networked connection in a UML class diagram?

我是研究僧i 提交于 2019-12-01 19:48:43

UML class diagrams are not appropriate to describe a topological notion as a "network"; they are better suited for hierarchies and interdependencies between objects. Or are you talking about a Connection class?

The Class Diagram is the wrong place to be trying to show network connections. A Class diagram will show only the classes in your software and how they relate to each other. You should use a Deployment Diagram to show how the elements of your software are going deployed across the network.

You could also include a Communication Diagram to show how the different parts of the software communicate with each other without regard to the deployment model.

Graph or a network is a structure in which any element (Class or object here in UM) may be connected to any other element. The "connection" can be any association other than "is a" in UML. As such, it is possible to represent the structure of graph or network using a set of classes and associations.

For example, consider a class of Places, an association "is connected by" and a class of Roads. With this any complex netwrok of Places and Roads can be represented by associating an instance of Place with another instance of Place and an instance of Road. RDF Tripples thus represent a semantic network.

Is there any other (special or specific) convention of representing a graph or network in OOAD / UML?

You should use a Deployment Diagram to show how the elements of your software are going deployed across the network. Deployment diagrams are used to visualize the topology of the physical components of a system where the software components are deployed. Deployment diagram: describes the hardware used in system implementations and the execution environments and artifacts deployed on the hardware. http://search.aol.com/aol/image?s_it=topsearchbox.imageDetails&v_t=client_searchbox&imgsz=&imgtype=&imgc=&q=deployment+diagrama+uml And You use the tool Rational Rose for get that. All is for documentation, when something is changing in the network, and every know that you used Rational Rose and Deployment Diagram. Structure diagrams emphasize the things that must be present in the system being modeled, and every Diagram has a function.

As mentioned above already UML is serving other purposes than representing physical infrastructure of a network or components.

Some examples of network diagrams can be found on creatley -> https://creately.com/diagram/example/hfgz8ekz/Network%20Architecture%20Diagram

I personally like to use https://www.draw.io/ to generate diagrams - it's web-based, very intuitive and has many features and a large library of image-sets.

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