Home » Programming » Archive by category "Software Architecture"

Architecture Explorer in VS2010 Beta

Visual Studio 2010 Beta is public and can be freely downloaded from here, and you can choose from 2 editions: Visual Studio 2010 Professional Edition and Visual Studio Team System 2010.

I downloaded a few weeks ago the Team System edition and started to make some projects and discover what’s new. The most interesting thing I found new in this version is the UML support (finally, I don’t need another tool to design the diagrams!) and the architecture support, in a new window called Architecture Explorer. I tried to find some detailed information about what can be done with this new functionality, but unfortunately I didn’t find enough, so I was back to my initial thought: just try and see what it can do!

You can view the Architecture Explorer window by selecting it in the View menu (for now it does not have a key shortcut combination). A new window will appear and you have 2 ways of viewing an exiting project from the architectural perspective:

  1. Class View
  2. Solution View
ArchitectureExplorer

Architecture Explorer

The basic idea of this Architecture Explorer is that it allows you to navigate easy between different levels of the project, going from a top and general view (the solution’s projects, for example) inside a more detailed vision (to class members and even code implementation). From one level to another there is always a new panel that can be hidden or displayed and you can go back just by clicking a intuitive arrow.

In the Class View situation, the levels for navigations would be: Namespaces -> Types (classes and interfaces) -> Members (methods or attributes for a class); If you choose a method, you can go further and see the parameters, the blocks of code and so on.

Architecture Explorer - Class View

Architecture Explorer - Class View

In the Solution View situation, the levels for navigations would be: Projects -> Project Items (which is like a directory structure – it contains the files and the folders in that project) -> Classes -> Members (from here it’s the same as Class View)

Architect Explorer - Solution View

Architect Explorer - Solution View

For each level in the Architect Explorer, there is a filter, which can be used by selecting the header of the level’s column and afterwards selecting the ‘down’ arrow, which will popup the filter’s options. I will present some of them as images, because the options are very intuitive.

Filters for Projects

Filters for Projects

Filters for Project Items

Filters for Project Items

Filters for Classes

Filters for Classes

Filters for Members

Filters for Members

Filters for Code

Filters for Code

The basic options on the Architect Explorer are:

  • Export DGML File – allows you to save the DGML (Directed Graph Markup Language) file somewhere on the disk; If you want to find out more about DGML, read here.
  • Refresh Content – refreshes the Architecture Explorer‘s visual content
  • Save Query to Favorites – afterwards you can access it via the Architecture Explorer window
  • Create new Graph Document and populate it with the contents of the current selection – you must select a element layer, and VS will generate for you a diagram (using Directed Graph Markup Language) that contains the full path you got to that element; You can see this diagram in the main window and also, you can see the generated dgml code (but more on that in another post)

    DGML Example Generated from Architect Explorer

    DGML Example Generated from Architect Explorer

  • Copy the selected nodes from the Architect Explorer to the current active Document Graph , which will add in the current diagram the nodes and the relationships between them, like this:

    DGML Example with Relationship Between Nodes

    DGML Example with Relationship Between Nodes

That’s just a preview on what the Architect Explorer can do, I hope this made you curious and you’ll give it a try and use it, because it has great flexibility, it is intuitive, user-friendly and also:

  • It can generate diagrams from existing code (this is a great advantage of build-in tools).
  • It makes it easier to explain a certain part of a solution to any team member.
  • It simplifies the communication process between the team members (architects and developers).
  • It offers a simple and efficient way of understanding the system and its components, the way they are related and can be used; it will reduce considerably the time needed to get acquainted with the code and the project.