views:

197

answers:

6

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)

A: 

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.

jbl
A: 

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++.

Boris Terzic
+3  A: 

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.

Steve Duitsman
+1  A: 

I find doxygen is useful for generating all kinds of dependency information when faced with a new project. It apparently handles "C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D". It uses Graphviz to generate graphical dependency charts. You can include full source code, with hyperlinks from everything that was recognised. If you are lucky there will be some documentation that doxygen understands in there already. You can then navigate around the code quickly, learning what all the relationships are.

Nick
A: 

I second the Doxygen comment by Nick. I am using Doxygen for C#.NET and it generates class diagrams, inheritance diagrams, etc. Here is an informative blog post.

Kevin P.
A: 

NDepend comes with a dependency graph coupled with a dependency matrix hat shows relations in existing code. You can try NDepend straight on your code thanks to a Free Trial Edition. See screenshoots extracted from this blog post: Interactive Code Dependencies Graph

alt text

alt text

alt text

alt text

Patrick Smacchia - NDepend dev