次の方法で共有


"Standard Graphs"

It became clear from the emails and comments to my last post that I should probably spend a little more time describing the functionality found in the VSTS 2010 CTP a bit better, specifically that functionality involving the Architecture Explorer and the graphs generated via the AE. ( I just figured everyone had already run out, downloaded that 7.5gig image, and started playing! :) )

This post introduces the three "Standard Graphs" found off the Architecture Explorer using the DinnerNow - ServicePortfolio2 solution found in that aforementioned CTP. The idea behind these graphs are to give you the ability to get some "typical" views of your source base with as few mouse clicks as possible.

Standard Graphs

Here's a shot of the Archicture Explorer, as seen with the DinnerNow solution open in VS 2010:

image

You'll notice the Visualize Code Relationships menu item, which is where you'll find the three menu items that will create graphs by Assembly, Namespace, or Class dependencies based on the contents of the current solution.

Visualize Call Dependency - By Assembly

If you select the Visualize Call Dependency - By Assembly menu item, here's what you'll get:

image

This graph is all about showing you the dependencies between the various assemblies that make up all the projects in your solution. If you don't have the solution built, you'll notice that after selecting this menu item ( this will happen for any "standard" graph actually ) the solution is built. This is due to the fact that we are cracking the assemblies in the output directories and gathering the information found there.

The nodes you see above represent each of the assemblies discovered in this solution. You'll also notice links of various thickness between these nodes. The thicker the link, the more dependencies between the two assemblies. We sometimes refer to these types of links as "blood vessels".

Notice the chevrons in the upper right hand corner of the nodes in this graph:

image

This is an "expand / collapse" button for this "group" node. You'll also notice in the upper left corner of each node, a number indicating the number of internal nodes inside the group. Here's what the DinnerNow.Services assembly node looks like when expanded ( click for larger view ):

image 

The green and blue nodes represent Classes and Interfaces. You'll notice in the shot above the tooltip displayed as I hover over the CustomerService node, the category reads "Class". If I double-click on that node, it takes me to the source code where that class is defined.

Visualize Call Dependency - By Namespace

Selecting the Visualize Call Dependency - By Namespace results in a similar type graph, except this time the initial nodes you see below represent the namespaces found in the solution:

image

Clicking on the chevron of the DinnerNow.Services node shows the exact same information as it did when viewing from the Assembly diagram ( show below in-situ ):

image

Visualize Call Dependency - By Class

Selecting the Visualize Call Dependency - By Class results in the most complicated of graphs, mostly because what you are seeing is dependencies at the class level, with no grouping by assembly or namespace. Expanding a chevron in this graph reveals methods, properties, fields, indexers, etc. that are contained by that class or interface. Below is a shot of just a section, as the graph is pretty large:

image

One thing to point out if you haven't already discovered this, is that if you hover your mouse over a particular link, you can quickly jump to either end of the link. Quite helpful on large graphs like the Class dependency graph!

image

One other thing worth mentioning. The dependencies discovered on these graphs are dependencies discovered through static analysis of method call data, not structural dependencies. For example, if you have two classes that don't call each other but one includes the other as a type for a member, no dependency link will be created.

What other "Standard Graphs" should we include out of the box? What are some typical views over your solution that you would like one to two clicks away?

Thanks!

Cameron

Comments

  • Anonymous
    December 28, 2008
    Maor David on Visual Studio 2010 Lab Management Martin Woodward on New Visual Studio 2010 Video Podcast...
  • Anonymous
    January 26, 2009
    In this previous post I introduced you to the new format, and then this follow on post showed some of
  • Anonymous
    February 01, 2009
    The comment has been removed