Create your first view description
This tutorial shows how to configure a view model once your domain is ready.
1. Prerequisites
-
A studio project that already contains the domain for your DSL.
-
At least one test project where you can create representations to validate the result.
2. Steps
-
Open or create a studio project
-
Navigate to the Project Browser on the homepage and create a new Studio project or reuse the one that stores your domain.
-
-
Add a view model
-
Create a new View model (this replaces the
.odesignfile from Sirius Desktop). -
Name it after the DSL or the representation bundle (for example
DatabaseRevieworRequirementFlow).
-
-
Create the representation description
-
Inside the view, add the representation type you need (Diagram, Table, Deck, Form, Tree, …).
-
Set the
domainTypeso the runtime knows on which semantic elements users can instantiate the representation. -
Configure the
titleExpressionandiconExpressionthat appear in tabs or launchers.
-
-
Map semantic elements
-
Add descriptions (nodes, edges, cards, rows, widgets) and point them to the appropriate domain entities.
-
Provide a
semanticCandidatesExpression, preconditions, and label expressions using AQL.
-
-
Style and organize the view
-
Reference color palettes and text style palettes to keep visual consistency.
-
Add conditional styles to react to semantic state (status, priority, ownership, etc.).
-
-
Add behavior
-
Configure palette entries (create/delete/link) and customize the default tools if needed.
-
Combine operations and optional Java services to implement complex behaviors.
-
-
Test iteratively
-
Reopen the test project, and create the representation.
-
Adjust expressions, refresh the representation, and repeat until the UI matches your expectations.
-
3. Next steps
-
When the view behaves as expected, export the studio project or package it into your Sirius Web application.
-
Continue with other representation types or move on to View Description for deeper customization options.