You can use MDriven Designer to create a model, organize it with diagrams, and document classes, processes, and state in one repository; this introduction is for new users following the first Designer overview.
MDriven Designer is a modeling environment in which you define a model of your application. A diagram is a visual representation of model elements, such as classes. The same class can appear on more than one diagram without becoming a different class.
For the complete sequence of overview sessions, see HowTos:MDriven Designer Overview Series. For a broader introduction to the product, see Documentation:Introduction to MDriven Designer.
Start MDriven Designer
MDriven Designer is distributed through Microsoft ClickOnce. ClickOnce starts the application from its published location and updates it when an update is available.
- Go to the MDriven Designer site.
- Select Run with ClickOnce.
- If your browser does not recognize the
.applicationfile type, configure a ClickOnce handler or use a browser and environment that supports ClickOnce. - Start the application after the browser has handed the ClickOnce file to its handler.
- When Designer opens, it starts with the default or starting model. Create a new model when you want to begin the walkthrough from an empty starting point.
Understand the overview screen
The overview screen shows the diagrams in the current model. The Repository tree also lists the model content and is the primary place to select and organize it. When you select an item in the Repository tree, its properties are shown in the Object Inspector, below the tree.
For example, a new model can contain one class diagram named Diagram1. That diagram is visible both on the overview screen and in the Repository tree.
| Area | What you use it for | Example |
|---|---|---|
| Overview screen | See and open diagrams in the model. | You can see Diagram1 as a diagram on the screen.
|
| Repository tree | Select, create, and navigate model content. | Select Diagram1, or add another class diagram.
|
| Object Inspector | View and edit properties of the selected item. | Change the selected diagram's Name property to MyFirstDiagram.
|
Create and name class diagrams
A class diagram displays classes and their relationships. Use diagrams to make separate views of a model; do not treat each diagram as a separate model.
- In the Repository tree area, choose Add Class diagram.
- Designer adds a new diagram, such as
Diagram2, to both the Repository tree and the overview screen. - Select the new diagram in the Repository tree.
- In the Object Inspector, edit the Name property. For example, rename
Diagram2toMyNewDiagram. - Select the original diagram and rename it to
MyFirstDiagramif you want the names to describe their purpose.
A diagram has properties that control its behavior. You do not need to set these properties to begin modeling, but they let you control how diagrams are organized and used.
Categorize diagrams
A category is a named label that you can apply to diagrams.
- In the Repository tree area, choose Add a category.
- Select the new category and enter a name in its Name property, for example
Important. - Add another category if needed, for example
LessImportant. - Select a diagram and set its category to organize it. For example, apply
ImportanttoMyFirstDiagramandMyNewDiagram.
Use categories to identify the diagrams that matter to a particular discussion or area of the system. They organize diagrams; they do not change the classes shown on those diagrams.
- Double-click a diagram to enter it.
- Use the switch-back arrow to return to the overview screen.
- You can also select or double-click diagrams in the Repository tree to move between them.
When diagrams are empty, switching between them can be hard to notice. Rename diagrams early and add a small amount of content so that each view is recognizable.
Add classes and reuse them on diagrams
A class represents a type in your model. Classes live in a package, which is a way to divide a software system into sections, similar to a namespace. A model can have multiple packages, but you do not need multiple packages for a small starting model.
- Enter
MyNewDiagram. - Right-click in an empty area of the diagram and choose Add a class.
- Name the class
Class1. - Add a second class named
Class2if you want a second example element.
The new classes appear on MyNewDiagram and in the Repository tree. They do not automatically appear on MyFirstDiagram, because each diagram controls which model elements it displays.
Show an existing class on another diagram
- Return to the overview screen and enter
MyFirstDiagram. - Locate
Class1in the Repository tree. - Drag
Class1from the Repository tree ontoMyFirstDiagram.
Class1 now appears on both diagrams. It remains one class in the model, with two visual representations. For example, you can use MyNewDiagram to show classes being developed and MyFirstDiagram to show a higher-level view containing the same classes.
You can also drag one diagram onto another diagram. Designer shows the inserted diagram as a small diagram image, which helps you build navigation and overview diagrams.
Capture processes
A process records a workflow: the order in which work is performed. Process information can document the domain you are designing before or alongside implementation details.
- Add a process definition from the Repository tree area.
- Name the process, for example
Fetching Mail. - Double-click the process in the Repository tree to open its process view in the Enterprise window.
- Add the steps that describe the workflow.
- Add a process diagram when you need a visual representation of the process and enrich it as you learn more about the domain.
For example, Fetching Mail can document the steps involved in retrieving mail. As the model evolves, the process can be connected to the information, actors, and classes that describe how the work is performed.
Add a StateMachine
A StateMachine describes the states of a class. Unlike a class diagram or process diagram, creating a StateMachine requires a class attribute that represents state.
- Select
Class1. - Add a StateMachine.
- Designer creates a state attribute named
StateonClass1and opens the new StateMachine. - Use the switch-back navigation to return to the class diagram when you want to continue modeling the class.
For example, a class can use its State attribute to represent the current state managed by its StateMachine. Keep the StateMachine focused on the lifecycle of that class rather than using it as a general process diagram.
Continue learning
This page covers the initial repository and diagram concepts. Continue with the overview series for topics such as modal ViewModels, actions, navigation, and prototyping. See Documentation:Designer for the Designer documentation entry point.
