
Developing a new functionality for an existing application may confuse anyone, since there is always a difference between the original design and the current implementation.
New architectural tools in Visual Studio Team System 2010 will help you understand the existing application, design the new functionality you need and verify that your implementation fits your design.
')
Determining what you have
Determining the dependencies between parts of your application can be very important for finding potential problems. Plus, with a visual presentation, you can find the best place to implement new functionality.
You can get a visual representation of your build solution, namespace, class, or custom filter as a document in Directed Graph Markup Language (DGML) format using the Generate Dependency Graph tool:

As shown below, a DGML document created on the basis of a solution can be presented in several variants: Dependency Matrix, Force Directed Layout or Top to Bottom layout. Each option offers its own presentation of the project structure.

This is a high-level view and a great opportunity to appreciate the overall view of the architecture of your application. But an idea of the dependencies for the area of changes that you need to make will help to do in 15 minutes what could take an hour. For example, the ability to visualize the relationship of the Cart class with other classes allows you to get a very simple way to make changes to the basket mechanism:

Another useful way to understand how your application works is the ability to visualize the sequence of calls that occur in key parts of your application. The Generate Sequence Diagram function, available through a code editor, gives you the opportunity to look at the calls to the methods your application makes. Below you can look at the image of the call sequence that the Add method for the cart produces.

Design new functionality
Now, when you more fully understand how your existing application works, you will be able to more effectively develop new functionality. Collaboration of the team in the development of design requires communication with each other in a standard form. The Unified Modeling Language (UML) diagrams allow you to express your application design in a way that others can understand. For example, you can build UML Component and UML Class diagrams that describe the existing elements of the structure of your design, and then add new elements to the diagrams to illustrate and document your changes. Below is a variant of such a Component-diagram:

A class diagram might look like this:

The Use Case diagram below allows the team to better understand the functions and come up with the decision to add functions to the application:

When working with UML diagrams, you can create or link items in the designer with items in the Work Item Tracking system of the Team Foundation Server (TFS):

Ensuring application validation
Over time, the quality of the code in the project may degrade if the correction of bugs and the addition of functions is not performed in accordance with the architecture. This is the case when the Layer designer and Layer validation tools can help. Layer designer allows you to define logical levels and valid message modes between levels in a project. When you associate assemblies, namespaces, and classes with layers in the Layer diagram designer, you can validate existing or new code based on level constraints. For example, in this level diagram, the code from the presentation level is allowed to have links with the code at the business logic level. At the same time, since the link between the presentation and access to resources (Resource Access) is not presented here, then any code that tries to get such a dependency should lead to errors during compilation.

You can validate level constraints from the designer, command line, or through the build process. The build process ensures that the code that violates the level restrictions does not fall into the code control tool.
We looked at some of the architecture tools in Visual Studio Visual Studio Team System 2010. You can learn more about them or other features
on the Cameron Skinner blog .
