Skip to main content

First Class Diagram

A class diagram establishes a shared domain vocabulary before components and data storage are discussed. Start with a small order model containing three classes and their first relationship.

Full lesson walkthrough in the selected color theme.

Create the Diagram​

Open the domain that owns the model. If the domain has no diagrams, the create action is available directly in the empty state.

Loading image...
The model is created in the context of the selected domain

Enter a clear name and briefly describe the model's purpose. Set Type to Class Diagram.

Loading image...
The specialized diagram type is selected for the domain model

After saving, select the diagram row and choose Open.

Loading image...
The selected diagram opens in its own workspace

Modeling Tools​

The palette offers four operations: create a class or relationship, or add an existing class or relationship from the landscape model. The same object can therefore be reused across several views.

Loading image...
Classes and relationships can be created or reused from the model

First Classes​

Create an Order class. For now, provide only a name and a brief description of its responsibility. Attributes and methods are added in the next lesson.

Loading image...
The class receives a name, description, and domain

Add Order Item and Product in the same way. A small initial vocabulary makes it easier to validate the model boundary before extending it.

Loading image...
Order, Order Item, and Product form the core domain model

Class Relationship​

Select New: Relationship. Set From to Order and To to Order Item. Name the relationship so its meaning is clear when read in the arrow direction.

Loading image...
The source and target are explicit, and the relationship has a name and description

After saving, the relationship appears on the diagram. The model now shows that an order contains items; Product remains separate until the next refinement.

Loading image...
Order points to its items through a directed domain relationship

Chapters​

  • 00:00 — purpose of the domain model;
  • 00:06 — creating the diagram;
  • 00:14 — selecting the type;
  • 00:18 — saving the diagram;
  • 00:22 — opening the workspace;
  • 00:24 — diagram tools;
  • 00:29 — Order class;
  • 00:39 — Order Item class;
  • 00:49 — Product class;
  • 00:57 — three core concepts;
  • 01:00 — creating the relationship;
  • 01:14 — lesson result.

Previous lesson: Order Data Model.

Next lesson: Class Attributes, Methods, and Relationships.