Analyze and model your architecture

Make sure your app meets architectural requirements by using Visual Studio architecture and modeling tools to design and model your app.

  • Understand existing program code more easily by using Visual Studio to visualize the code's structure, behavior, and relationships.

  • Educate your team in the need for respecting architectural dependencies.

  • Create models at different levels of detail throughout the application lifecycle as part of your development process.

See Scenario: Change your design using visualization and modeling.

To

Visualize code:

- See the code's organization and relationships by creating code maps. Visualize dependencies between assemblies, namespaces, classes, methods, and so on.
- See the class structure and members for a specific project by creating class diagrams from code.
- Find conflicts between your code and its design by creating dependency diagrams to validate code.
- Visualize code
- Working with Classes and Other Types (Class Designer)
- Video: Understand design from code with Visual Studio 2015 code maps
- Video: Validate your architecture dependencies in real time
Define the architecture:

- Define and enforce constraints on dependencies between the components of your code by creating dependency diagrams.
- Video: Validate architecture dependencies with Visual Studio (Channel 9)
Validate your system with the requirements and intended design:

- Validate code dependencies with dependency diagrams that describe the intended architecture and prevent changes that might conflict with the design.
- Video: Validate architecture dependencies with Visual Studio (Channel 9)
Share models, diagrams, and code maps using Team Foundation version control:

- Put code maps, projects, and deoendency diagrams under Team Foundation version control so you can share them.
When you have multiple users who work with these items under Team Foundation version control, use these guidelines to help you avoid version control issues:

- Manage models and diagrams under version control
Customize models and diagrams:

- Create your own domain-specific languages.
- Modeling SDK for Visual Studio - Domain-Specific Languages
Generate text using T4 templates:

- Use text blocks and control logic inside templates to generate text-based files.
- T4 template build with MSBuild included in Visual Studio
- Code Generation and T4 Text Templates

To see which versions of Visual Studio support each feature, see Version support for architecture and modeling tools

Types of Models and Their Uses

Model type and typical uses
Code maps

Code maps help you see the organization and relationships in your code.

Typical uses:

- Examine program code so you can better understand its structure and its dependencies, how to update it, and estimate the cost of proposed changes.

See:

- Map dependencies across your solutions
- Use code maps to debug your applications
- Find potential problems using code map analyzers
Dependency diagram

Dependency diagrams let you define the structure of an application as a set of layers or blocks with explicit dependencies. You can run validation to discover conflicts between dependencies in the code and dependencies described on a dependency diagram.

Typical uses:

- Stabilize the structure of the application through numerous changes over its life.
- Discover unintentional dependency conflicts before checking in changes to the code.

See:

- Create dependency diagrams from your code
- Dependency Diagrams: Reference
- Validate code with dependency diagrams
Domain-specific language (DSL)

A DSL is a notation that you design for a specific purpose. In Visual Studio, it is usually graphical.

Typical uses:

- Generate or configure parts of the application. Work is required to develop the notation and tools. The result can be a better fit to your domain than a UML customization.
- For large projects or in product lines where the investment in developing the DSL and its tools is returned by its use in more than one project.

See:

- Modeling SDK for Visual Studio - Domain-Specific Languages

Where can I get more information?

Visual Studio Visualization & Modeling Tools Forum

See Also

What's new
DevOps and Application Lifecycle Management