Architectural Tools in Visual Studio 2010

Original author: Somasegar
  • Transfer


The development of new functionality for an existing application can be puzzling to 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 your existing application, design the new functionality you need, and verify that your implementation matches your design.


Definition of what you have


Identifying dependencies between parts of your application can be very important in finding potential problems. Plus, having a visual presentation, you can find the best place to introduce new functionality.

You can get a visual representation of your assembly, namespace, class or custom filter solution as a document in the Directed Graph Markup Language (DGML) format using the Generate Dependency Graph tool:



As shown below, a DGML document created from the solution can be represented in several versions: Dependency Matrix, Force Directed Layout or Top to Bottom layout. Each option offers its own view of the project structure.



This is a high-level presentation and a great opportunity to appreciate the overall view of the architecture of your application. But understanding the dependencies for the area of ​​change that you need to make will help you do what it could take an hour to do in 15 minutes. 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 cart 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 feature, available through a code editor, gives you the opportunity to take a look at the calls to the methods that your application produces. Below you can see the image of the sequence of calls that the Add method produces for the basket.



New Feature Design


Now that you have a better idea of ​​how your existing application works, you can more effectively develop new functionality. Team collaboration in design development requires communication with each other in a standard way. Unified Modeling Language (UML) diagrams let you express your application design in a way that other people can understand. For example, you can build UML Component and UML Class diagrams that describe existing structural elements of your design, and then add new elements to the diagrams to illustrate and document your changes. The following is a variant of such a Component diagram: The



Class diagram may look like this:



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



When working with UML diagrams, you can create or associate elements in the designer with elements in the Team Item Server (TFS) Work Item Tracking system:



Enabling Application Validation


Over time, the quality of the code in the project may degrade if fixing bugs and adding features is not done 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 ways of communication 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 restrictions. For example, in this level diagram, code from the presentation level is allowed to have relationships with the code at the business logic level. At the same time, since the connection between the level of presentation and access to resources (Resource Access) is not presented here, any code that tries to get such a dependency should lead to errors during compilation.



You can validate level restrictions from the designer, command line, or through the build process. The build process ensures that code that violates level restrictions does not fall into the code control.

We looked at some of the architecture tools of Visual Studio Visual Studio Team System 2010. You can get more information about them or other features on the Cameron Skinner blog .

Progg it

Also popular now: