다음을 통해 공유


Analyze and model your architecture

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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

  1. Understand existing program code better by visualizing the code structure, behavior, and relationships with code maps and dependency diagrams.

    • See the code's organization and relationships by creating code maps.
    • Visualize dependencies between assemblies, namespaces, classes, methods, and so on.
    • Find conflicts between your code and its design by creating dependency diagrams to validate code.
    • See the class structure and members for a specific project by creating class diagrams from code.
    • Generate text using T4 templates with text blocks and control logic inside templates to generate text-based files.
  2. Educate your team in the need for respecting architectural dependencies.

  3. 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.

Code maps

Code maps are one type of model that helps you see the organization and relationships in your code.

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

Learn more:

Dependency diagrams

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

Use dependency diagrams to:

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

Learn more:

Domain-specific language (DSL) models

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

Use domain-specific language to:

  • 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.

Learn more:

Edition support for architecture and modeling tools

Visual Studio is available in several editions. Not all of these provide support for the architecture and modeling tools. The following table shows the availability of each tool.

Feature Enterprise edition Professional edition Community edition
Code maps Yes Only supports reading code maps, filtering code maps, adding new generic nodes, and creating a new Directed Graph from a selection. -
Dependency diagrams Yes Only supports reading dependency diagrams. Only supports reading dependency diagrams.
Directed graphs (DGML diagrams) Yes Yes Yes
Code clone Yes - -