Using Layer Diagrams to Model and Enforce Application Architecture
What's in this chapter?
In the other chapters in this section of the book, you have learned about some of the different modeling diagrams available in Visual Studio Ultimate 2012. This chapter examines the final diagram—the layer diagram.
Layer diagrams are used to describe the structure of an application at a high level. You can also use these diagrams to verify that the developed code conforms to the high-level design laid out in the layer diagram. One nice feature about layer diagrams is the capability to validate application design architecture against the code base, ensuring that the code and architecture continue to match during the development process.
In a way similar to a traditional architecture diagram, a layer diagram shows the major components of the architecture design. Dependencies between the components are also laid out on the diagram. A diagram consists of one or more nodes, referred to as layers. A layer can represent any sort of logical group—for example, a namespace or a class file. Dependencies on a layer diagram can be defined explicitly based on your proposed architecture, or you can have the tool discover them from the existing relationships in the code. You can also incorporate layer diagrams into the automated build process, which enables you to verify that code changes adhere to ...