What to do with data types with lots of connections in a UML class diagram
https://softwareengineering.stackexchange.com/questions/392888
-
26-02-2021 - |
문제
I have a Pose
data type, consisting of x
, y
, and rotation
values.
This being a robotics application, the Pose
data type is used in about a dozen places throughout the application. Connecting all these up with dependencies makes the diagram very messy, is there a better solution?
해결책
If a class X has an attribute or parameter of type Pose, you don't need to draw a dependency from X to Pose. Using Pose in a feature of class X implies that class X depends on Pose.
다른 팁
Stop drawing connections just because you're supposed to draw connections.
In fact, stop drawing diagrams just because you're supposed to draw diagrams.
These things exist to help you communicate your design to other coders. Coders who are working in your domain and in your code base.
So please, even if you put Pose
in 1000 classes don't draw a 1000 diagrams of it. I get the point already.
If that sounds crazy then explain why the String
class doesn't show up in all of your diagrams.
Only show me the Pose
class when you have something interesting to say about it. Otherwise get this noise away from me.