Modeling with the Class Designer
WHAT’S IN THIS CHAPTER?
- Using the Class Designer to create a graphical visualization of your class architecture
- Easily generating and refactoring your classes with the Class Designer
- Using the Modeling Power Toys for Visual Studio 2012 add-in to better work with large-class hierarchies
Traditionally, software modeling has been performed separately from coding, often during a design phase that is completed before coding begins. More often than not, the modeling diagrams constructed during design are not kept up to date as the development progresses, and they quickly lose their value as design changes are inevitably made.
In Visual Studio 2012, class diagrams are constructed dynamically from the source code. Any change made to the source code is immediately reflected in the class diagram, and any change to the diagram is also made to the code. This means that they are always up to date, which allows them to become a more integral and useful part of the development process.
This chapter looks at the Class Designer in detail and explains how you can use it to design, visualize, and refactor your class architecture.
CREATING A CLASS DIAGRAM
The design process for an application typically involves at least a sketch of the classes that are going to be created and how they interact. Visual Studio 2012 provides a design surface, called the Class Designer, onto which classes can be drawn to form a class diagram. Fields, properties, and methods ...