使用 UML 理解代码
我是 UML 新手,我已经成功地将源代码转换为类图,该类图在一个框中显示了每个类。但这似乎不足以让我理解函数和对象是如何连接的。 这就是程序员所需要的吗?或者还可以做些什么来更好地理解项目的信息流?我目前在“企业架构师”工作。
I'm new to UML and I've managed to convert the source into class diagrams which shows every class in a box. but that doesn't seem like enough for me to understand how the functions and objects are connected.
Is that all what a programmer needs or what more can be done to better understand the information flow of their project? I'm currently working in 'Enterprise Architect'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
类模型(和类图)仅显示代码的静态结构。它们没有显示出随时间推移的交互作用。您将需要其中一个行为图 - 序列图、活动图,甚至可能是状态图。
The class model (and class diagrams) only show the static structure of your code. They show nothing about interactions over time. You will want one of the behavior diagrams for that - a Sequence diagram, Activity diagram, or maybe even a State diagram.
您应该连接这些类,如果一个类依赖于另一个类,则需要放入它们之间的链接。
连接器不仅仅用于继承,它们还描述类使用或包含在类中的对象。
这是快速教程。
You should connect the classes, if a class depends on another one, the link between them needs to be put in.
Connectors are not just for inheritance, they also describe objects used by the class or held within them.
Here's a quicky tutorial.