DCSIMG
How To Investigate Existing Code Using The Visual Studio 2010 Architect Tools - Eran Ruso
Sign in | Join | Help

How To Investigate Existing Code Using The Visual Studio 2010 Architect Tools

פורסם בתאריך Mar 19 2010, 12:06 AM על ידי Eran Ruso | ישנם 1 תגובות

How many times you have spent hours on code just to understand what it does?

How many of these times it was your own code?

From my experience the answer to both of these questions is A LOT!

In Visual Studio 2010 we can find a set of tools that can help us understand the code a lot faster.

On This post I will show some of the abilities we get with the Visual Studio 2010 Architect Tools when investigating an existing code.

Note: The Architect Tools is in the Visual Studio Ultimate Edition only.

Lets start with ways to investigate an existing code, for that I will use a common solution called “TailSpinToys”.

Step 1: Go to the “Architect” menu item on the main menu

Step 2: Choose “Generate Dependency Graph”

Step 3: Choose “By Assembly”

Step_1__Dependency_graph_by_assembly

What we get is an Assemblies graph that shows all the dependencies between the Assemblies in our solution and two more very important groups:

  • Generics
  • Externals

The thickness of the links shows how strong is the link between the assemblies.

Step_2__Dependancy_Graph_by_Assembly

Lets continue and play with it a little, I will extract the Generics group.

Its little hard to see but what we get is all the generics that we use in our solution

Step_3__etract_Generics

I will now extract the Externals group.

You can see here all the references that we use in the solution.

Step_4__Extract_Externals

I will now extend the System.dll

You can now see all the workspaces in the System.dll, these are not all the workspaces that exist but only the workspaces that are used.

Step_5__Extract_System_DLL

You can continue to dig in and see all the methods that are in the classes that are in the namespaces.

That is nice, but what if I like to be more specific in my Graph creation?

The answer to this need comes from the Architecture Explorer:

Step_10_Architecture_Explorer

Here you can choose what to investigate and set the scope for the graph.

Step_11_First_View

In my example I have done the following steps:

Step 1: Choose “Solution View”

Step 2: Click the filter to see only the “Projects”

Step_12__Clicking_on_Solution

Step_13__Choose_Project

You can see that the view is filtered by a Filter Icon.

 Step_14__Result

Step 5: Choose the Projects that are shown in the screenshot

Step 6: Click the “Files” bar and choose “References”

By choosing References you will see only the reference files

Step_15__Choose_projects

Step_16_Referances

Step 7: Filter by Project

Step_17_Filter_to_projects

Step_18_Filter

Step 8: Choose all and click the Generate a Graph button on the left

Step_19_choose_all

 Step_20_The_result

There are many more options in the architect tools that I will cover in future posts.

Have Fun!!!

רשימת תגובות

# How To Do A Software Design Description (SDD) With Architecture Tools In Visual Studio 2010

פורסם בתאריך Sunday, April 25, 2010 11:21 AM על ידי Eran Ruso  

When I work with customers on there Application Lifecycle Management (ALM) especially on the Development

שלח תגובה

(שדה חובה) 
(שדה חובה) 
(אופציונלי)
(שדה חובה) 

Enter the numbers above: