I find myself to be a visual person and sometimes it's easier to learn something if I can draw diagram/pictures out of it. My question is which tool do I use if I want to map a programming framework (for example .net) visually and see the relationship between all entities (such as classes and members).
6 回答
You might try NDepend. The great Scott Hanselman discusses it more here. Tons of visual dependency formats too. It sounds like its only for .NET though.
我发现doxygen在面对新项目时对于生成各种依赖信息很有用。它显然可以处理“ C++、C、Java、Objective-C、Python、IDL(Corba 和 Microsoft 风格)、Fortran、VHDL、PHP、C# 以及某种程度上的 D ”。它使用 Graphviz 生成图形依赖图表。您可以包含完整的源代码,以及来自已识别的所有内容的超链接。如果你幸运的话,那里会有一些 doxygen 已经理解的文档。然后,您可以快速浏览代码,了解所有关系。
A decent first-cut might be to write a simple PERL script to parse out dependencies and then pipe that data to Graphviz for visualization.
I'm not sure if you are asking only about .NET or other frameworks, my experience is mostly with Java but I'm sure similar tools exist for .NET.
On the level of classes you can get an auto-generated visualization using UML tools that can typically reverse engineer source code into a diagram. Netbeans is free and has Java source to UML reverse engineering features.
Class diagrams however are very low level, they tell you little (directly) about the larger architectural themes. At that point tools like Structure101 can be valuable in discovering architectural properties that you didn't realize were there. They have a trial version and can also deal with C and C++.
我支持尼克的 Doxygen 评论。我正在为 C#.NET 使用 Doxygen,它会生成类图、继承图等。这是一篇内容丰富的博客文章。