Click here to Skip to main content
11,410,536 members (58,902 online)
Click here to Skip to main content

Tagged as

Visualization in VS2010

, 4 May 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
If you have Visual Studio 2010 Ultimate, you have some serious architectural tools. One of my favorites (so far) is the Dependency Graph.Select Architecture-Generate Dependency Graph and you'll see that you can generate a graph by Assembly, Namespace, Class, or Custom. Try the Assembly...
If you have Visual Studio 2010 Ultimate, you have some serious architectural tools. One of my favorites (so far) is the Dependency Graph.

Select Architecture-Generate Dependency Graph and you'll see that you can generate a graph by Assembly, Namespace, Class, or Custom. Try the Assembly graph, and you'll see a visual representation of the relationships between the assemblies in your solution. You'll also see the relationships between those assemblies and third-party assemblies, as well as dependencies on the .NET Framework itself.

The real power comes in using this tool to understand the architecture of existing assemblies and frameworks. Try this:

1. Select Architecture-New Diagram
2. Select Directed Graph Document from the list
3. In the Architecture Explorer pane below, click Select Files
4. Find the System.Data.Entity assembly. It should be in C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.Entity.dll
5. Double-click System.Data.Entity in the Architecture Explorer pane after selecting it from the file system.

You will now see three boxes: System.Data.Entity, Generics, and Externals. Click arrows in the top right of the System.Data.Entity box. Voila! You now have a completely navigable view into all the namespaces that make up Entity Framework! These blue-colored boxes are namespaces. Open one up and you'll see the classes in that namespace. The graph can get quite large, so hold down the Ctrl key to pan and scroll in and out.

Select any class and you'll see the arrows connected to it light up. Hover over one of those arrows and you can navigate to the opposite endpoint. This is a great way to understand how an assemblies, namespaces, and classes interact with their dependencies.

You can now dig into Entity Framework and understand how LINQ Providers work from an architectural perspective. Try it on other framework assemblies, then try it on your own. You can share these graphs with users of Visual Studio Premium (they can view and navigate the graph but not edit.) You can also export them to PNG and use them for colorful wallpaper if you have a plotter! Smile | :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

dswersky

United States United States
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.5 | Last Updated 4 May 2010
Article Copyright 2010 by dswersky
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid