See EdwardTufte - one of the widely recognized masters of this field.
See also VisualizeTheWiki.
I'm fiddling with this stuff at the moment. In JavaLanguage, the artifacts are
- Packages
- Classes
- special case is interface
- Methods
- special case is constructors
- Variables
The
types of relationships are
- Containment
- Packages contain subpackages
- Packages contain classes
- classes contain inner classes
- classes contain methods
- classes contain variables
- Inheritance
- classes extend/implement classes
- methods override methods
- variables hide variables
- Dependency
- variables are of type class
- methods return type class
- methods take parameters of type class
- methods invoke methods
- special case is invoking initializer methods
- methods refer to variables
- methods have stack variables of type class
And that's about it, for Java. The different types of relationships are part of the problem of why visualization is awkward; they each form an important hierarchy often orthogonal to the others. You need six-dimensional space to lay it out properly.
Either that or a way to filter what you see at any given time. One of the reasons why I like TableOrientedProgramming is that one's view of information can depend on ad-hoc queries rather than the original layout that the original programmer had in mind. Views of tables help me "visualize" patterns because I can control what they are showing me at any given time. I don't know if there is any analogous VisualQueryLanguage? though.