<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Skinner's Blog : Architecture Explorer</title><link>http://blogs.msdn.com/camerons/archive/tags/Architecture+Explorer/default.aspx</link><description>Tags: Architecture Explorer</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>"Standard Graphs"</title><link>http://blogs.msdn.com/camerons/archive/2008/12/18/standard-graphs.aspx</link><pubDate>Thu, 18 Dec 2008 03:04:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9232721</guid><dc:creator>camerons</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/camerons/comments/9232721.aspx</comments><wfw:commentRss>http://blogs.msdn.com/camerons/commentrss.aspx?PostID=9232721</wfw:commentRss><description>&lt;p&gt;It became clear from the emails and comments to my &lt;a href="http://blogs.msdn.com/camerons/archive/2008/12/16/introduction-to-directed-graph-markup-language-dgml.aspx"&gt;last post&lt;/a&gt; that I should probably spend a little more time describing the functionality found in the &lt;a href="http://blogs.msdn.com/briankel/archive/2008/10/27/helpful-links-for-the-visual-studio-2010-ctp.aspx"&gt;VSTS 2010 CTP&lt;/a&gt; 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! :) )&lt;/p&gt;  &lt;p&gt;This post introduces the three &amp;quot;Standard Graphs&amp;quot; found off the Architecture Explorer using the &lt;strong&gt;DinnerNow - ServicePortfolio2&lt;/strong&gt; solution found in that aforementioned CTP. The idea behind these graphs are to give you the ability to get some &amp;quot;typical&amp;quot; views of your source base with as few mouse clicks as possible.&lt;/p&gt;  &lt;h3&gt;&lt;u&gt;Standard Graphs&lt;/u&gt;&lt;/h3&gt;  &lt;p&gt;Here's a shot of the Archicture Explorer, as seen with the DinnerNow solution open in VS 2010:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="316" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image.png" width="501" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;You'll notice the &lt;strong&gt;Visualize Code Relationships&lt;/strong&gt; 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.&lt;/p&gt;  &lt;h3&gt;&lt;u&gt;Visualize Call Dependency - By Assembly&lt;/u&gt;&lt;/h3&gt;  &lt;p&gt;If you select the &lt;strong&gt;Visualize Call Dependency - By Assembly&lt;/strong&gt; menu item, here's what you'll get:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_3.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="324" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_thumb.png" width="640" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;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 &amp;quot;standard&amp;quot; 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.&lt;/p&gt;  &lt;p&gt;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 &amp;quot;blood vessels&amp;quot;.&lt;/p&gt;  &lt;p&gt;Notice the chevrons in the upper right hand corner of the nodes in this graph:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="125" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_4.png" width="252" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;This is an &amp;quot;expand / collapse&amp;quot; button for this &amp;quot;group&amp;quot; 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 &lt;strong&gt;DinnerNow.Services&lt;/strong&gt; assembly node looks like when expanded ( click for larger view ):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_5.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="98" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_thumb_3.png" width="640" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The green and blue nodes represent Classes and Interfaces. You'll notice in the shot above the tooltip displayed as I hover over the &lt;strong&gt;CustomerService&lt;/strong&gt; node, the category reads &amp;quot;Class&amp;quot;. If I double-click on that node, it takes me to the source code where that class is defined.&lt;/p&gt;  &lt;h3&gt;&lt;u&gt;Visualize Call Dependency - By Namespace&lt;/u&gt;&lt;/h3&gt;  &lt;p&gt;Selecting the &lt;strong&gt;Visualize Call Dependency - By Namespace&lt;/strong&gt; results in a similar type graph, except this time the initial nodes you see below represent the namespaces found in the solution:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_6.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="191" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_thumb_4.png" width="640" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking on the chevron of the &lt;strong&gt;DinnerNow.Services&lt;/strong&gt; node shows the exact same information as it did when viewing from the Assembly diagram ( show below in-situ ):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_7.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="113" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_thumb_5.png" width="640" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h3&gt;&lt;u&gt;Visualize Call Dependency - By Class&lt;/u&gt;&lt;/h3&gt;  &lt;p&gt;Selecting the &lt;strong&gt;Visualize Call Dependency - By Class&lt;/strong&gt; 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:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_8.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="480" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_thumb_6.png" width="542" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;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!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="149" alt="image" src="http://www.cwskinner.members.winisp.net/BlogImages/StandardGraphsArchitectureExplorerandDGM_CF84/image_9.png" width="352" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;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. &lt;/p&gt;  &lt;p&gt;What other &amp;quot;Standard Graphs&amp;quot; should we include out of the box? What are some typical views over your solution that you would like one to two clicks away?&lt;/p&gt;  &lt;p&gt;Thanks!&lt;/p&gt;  &lt;p&gt;Cameron&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9232721" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/camerons/archive/tags/tsbt-arch/default.aspx">tsbt-arch</category><category domain="http://blogs.msdn.com/camerons/archive/tags/Architecture+Edition/default.aspx">Architecture Edition</category><category domain="http://blogs.msdn.com/camerons/archive/tags/VSTS+2010+Fall+CTP/default.aspx">VSTS 2010 Fall CTP</category><category domain="http://blogs.msdn.com/camerons/archive/tags/Architecture+Explorer/default.aspx">Architecture Explorer</category><category domain="http://blogs.msdn.com/camerons/archive/tags/Standard+Graphs/default.aspx">Standard Graphs</category></item><item><title>Introduction to Directed Graph Markup Language ( DGML )</title><link>http://blogs.msdn.com/camerons/archive/2008/12/16/introduction-to-directed-graph-markup-language-dgml.aspx</link><pubDate>Tue, 16 Dec 2008 23:59:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9228382</guid><dc:creator>camerons</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/camerons/comments/9228382.aspx</comments><wfw:commentRss>http://blogs.msdn.com/camerons/commentrss.aspx?PostID=9228382</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;DGML, or &amp;quot;Directed Graph Markup Language&amp;quot; is what we are using in VSTS 2010 Architecture to render graphs like the one below:          &lt;br /&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb31.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="324" alt="image_thumb3[1]" src="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb31_thumb.png" width="640" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;The power of DGML is in its simplicity. Let me show you what I mean.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;If you launch the &lt;a href="http://blogs.msdn.com/briankel/archive/2008/10/27/helpful-links-for-the-visual-studio-2010-ctp.aspx"&gt;VSTS 2010 CTP&lt;/a&gt;, open a project, click &lt;strong&gt;View-&amp;gt;Architecture Explorer&lt;/strong&gt;, then click the button shown below...           &lt;br /&gt;&amp;#160;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="209" alt="image_thumb8" src="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb8_thumb.png" width="609" border="0" /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;...you'll get a new dgml editor in the document well. You can then right click inside that document and select &amp;quot;View Code&amp;quot;. Right click on the tab of the resulting editor and select &amp;quot;New Horizontal Tab Group&amp;quot;. You'll have something similar to this:&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb14.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="468" alt="image_thumb14" src="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb14_thumb.png" width="640" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;&lt;font color="#333333"&gt;If you add a &lt;strong&gt;Link&lt;/strong&gt; element as a child element to the &lt;strong&gt;Links&lt;/strong&gt; node, with a &lt;strong&gt;Source &lt;/strong&gt;and &lt;strong&gt;Target&lt;/strong&gt; attribute, you'll get something similar to this:&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb17.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="467" alt="image_thumb17" src="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb17_thumb.png" width="640" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;font color="#000000"&gt;To add a few more elements, try this:&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb20.png" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="469" alt="image_thumb20" src="http://www.cwskinner.members.winisp.net/BlogImages/IntroductiontoDirectedGraphMarkupLanguag_B68E/image_thumb20_thumb.png" width="640" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You'll notice the &lt;strong&gt;Nodes&lt;/strong&gt; element isn't even needed to render the graph above. That is really all you need to know to visualize all kinds of data. Rest assured there is a lot more goodness to discuss about this technology, but the simplicity of it is one of the most exciting aspects as far as I'm concerned!&lt;/p&gt;  &lt;p&gt;In my next post, I'm actually going to show you how, armed with just this little nugget of DGML information, you can visualize some Java code. Stay tuned!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9228382" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/camerons/archive/tags/tsbt-arch/default.aspx">tsbt-arch</category><category domain="http://blogs.msdn.com/camerons/archive/tags/Architecture+Edition/default.aspx">Architecture Edition</category><category domain="http://blogs.msdn.com/camerons/archive/tags/VSTS+2010+Fall+CTP/default.aspx">VSTS 2010 Fall CTP</category><category domain="http://blogs.msdn.com/camerons/archive/tags/DGML/default.aspx">DGML</category><category domain="http://blogs.msdn.com/camerons/archive/tags/Architecture+Explorer/default.aspx">Architecture Explorer</category></item></channel></rss>