🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
MDriven designer overview Part 4
This page was created by Alexandra on 2016-12-08. Last edited by Wikiadmin on 2026-07-29.

This part of the MDriven Designer overview helps you configure how a ViewModel is presented and introduce an action that opens a modal ViewModel; it is for modelers who are building and testing a declarative user interface.

What you will learn

In this part, you work with two related parts of a MDriven Designer model:

  • Presentation properties are UI hints attached to a ViewModel. They describe how the result of a ViewModel transformation should be presented.
  • A modal ViewModel action is an action that opens another ViewModel modally. A modal view requires the user to complete or close that view before returning to the view that opened it.

A ViewModel is a series of transformation expressions that turns part of the model into a potentially transformed view of that model. ViewModels can also carry UI hints; those hints, together with the transformation result, are used to derive a user interface declaratively.

Work through the presentation before adding the action

Use the ViewModel you created or inspected in the preceding overview sessions as the starting point.

  1. Select the ViewModel whose presentation you want to configure.
  2. Review its presentation properties in MDriven Designer.
  3. Set the presentation properties needed for the view you are designing.
  4. Run or inspect the ViewModel presentation and confirm that it communicates the intended view to the user.

For example, treat presentation properties as part of the view specification rather than as changes to the underlying domain model: the ViewModel defines the transformed information to show, while its presentation properties provide hints for how that information is presented.

Introduce a modal ViewModel action

After defining the presentation of the current ViewModel, add an action that opens the related ViewModel modally.

  1. Identify the ViewModel that should be opened from the current view.
  2. Define an action on the current ViewModel for that transition.
  3. Configure the action to open the target ViewModel as a modal view.
  4. Test the action from the presented ViewModel.
  5. Close or complete the modal view and verify that the user returns to the originating view.

For example, a user can start in one ViewModel, invoke an action, work in the modal ViewModel, and then return to the original ViewModel when the modal view is closed. This keeps the secondary interaction distinct from the view that launched it.

Design considerations

Concern What to check
ViewModel purpose Ensure that the source ViewModel has a clear user task and that the modal ViewModel represents the secondary task that must be completed or closed before the user continues.
Presentation hints Keep presentation properties with the ViewModel they describe. They are UI hints for the transformed view, not domain-model changes.
Action flow Test both directions: that the action opens the intended modal ViewModel and that closing the modal view returns the user to the original context.

Continue the overview series

This page covers Part 4, Modal View Models and more, in the MDriven Designer Overview Series. Continue with the series for the wider model-building workflow, and use Part 10: Actions and navigation for the later discussion of actions and navigation.

See also