You can use the WECPOF prototyper application in MDriven Designer to inspect how ViewModels and actions form the navigation and interaction structure of a modeled application; this overview is for developers following the MDriven Designer Overview series.
Purpose of this part
Part 3 explains how actions and ViewModels work together in the prototyper application. A ViewModel defines a view of model data for an application. An action is an operation that can be made available when its owning class is viewed.
For example, when a ViewModel shows a list of houses, an action can take the user from that list to a ViewModel that shows one selected house. The prototyper lets you inspect this behavior while you develop the model.
Model first, implementation technology separately
MDriven Designer captures the business information and rules of a system in a model. This separates the definition of the business system from a specific implementation technology.
This approach means that you work with the concepts that matter to the domainâsuch as House, Customer, or Bookingâand define their relationships, rules, views, and actions in the model. The diagrams are representations of model elements; they are not separate copies of those elements. See Part 1 for the distinction between the repository, packages, and diagrams.
Inspect actions in the prototyper
Use the prototyper to verify that an action is available in the intended view and that it leads to the expected ViewModel.
- Open the relevant ViewModel in the prototyper application.
- Find the action in the rendered view.
- Run the action and verify the resulting view.
- Return to the overview and inspect the ViewModels and action navigation shown there.
- Refresh the overview when you need to update the displayed navigation information.
An action defined on a class can be relevant wherever that class is viewed. Whether it is offered in a particular rendered view depends on how it is configured for that view. Check the rendered result rather than assuming that a class action is available everywhere.
After ViewModels and actions have been created, the Designer overview can show the ViewModels and the action navigation between them. This gives you a navigation tree or storyboard-like view of the application flow.
For example, the navigation can show a ViewModel named show.allhouses leading to a house view. If an action leads from the list to a selected house, follow that connection in the overview and then run the action in the prototyper to confirm the result.
As the application grows, use this overview to identify ViewModels that are not reachable from an action. An unreachable ViewModel may be intentional during development, but it should be reviewed before you rely on it as part of an application flow.
Related topics
This page is one part of the MDriven Designer Overview series. Continue with Part 4 for presentation properties and modal ViewModel actions.
For detailed Designer guidance, see Documentation:Designer and MDriven Designer Features & Settings. For actions and navigation, see Part 10: Actions and navigation.
