Mockotype is a simplified mode of MDriven Designer for analysts, domain experts, and developers who want to model, execute, and discuss an information-system prototype without exposing the advanced Designer features.
Mockotype helps you replace disconnected requirement lists with an executable model. You define the information your system handles, derive rules and user interfaces from that model, and test the result in a local prototyper. A model made in Mockotype is compatible with MDriven Designer and MDriven Framework when you need the advanced product capabilities.
For Mockotype's place in the wider product family, see Documentation:MDriven Product Line.
What you can do
Use Mockotype to create and test a working specification of an information system. For example, you can model Customer and Order, connect each order to its customer, generate forms, enter sample data, and use the resulting prototype to validate the workflow with stakeholders.
Mockotype includes the following capabilities:
| Area | What you can do | Example |
|---|---|---|
| Information model | Define classes, attributes, associations, and diagrams. | Create a Customer class with a Name attribute, then associate a customer with many Order objects. |
| Derived rules | Use OCL (Object Constraint Language) to derive attribute values and association ends. | Derive a value from other modeled information instead of entering and maintaining the value separately. |
| Behavior | Implement methods with Action Language (also called EAL): OCL expressions with side effects. | Add an action that creates or updates modeled objects when the user presses a button. |
| User interface | Create ViewModels, including AutoForms. A ViewModel defines the data and actions presented in a view. | Generate a form for Customer and a search view for finding existing customers. |
| Local execution | Run the model with local WPF and Turnkey prototypers, including local Turnkey XML persistence. | Create sample records, save them locally, search for them, edit them, and save the changes again. |
| Model inspection | Debug model instances. | Inspect the objects created while you test an action or a derived rule. |
| Documentation and presentation | Use documentation functionality and Turnkey assets and Fashion, including Fashion with tag expanders. | Document model intent and adjust the prototype presentation. |
Build your first working prototype
The following example creates the smallest useful system: one class, one text attribute, generated forms, and local data entry.
- Start Mockotype.
- Select Define information.
- Add a new class. For example, name it Contact.
- Add an attribute to Contact with type String. For example, name it Name.
- Select Define views.
- Choose Update AutoForms. Mockotype generates ViewModels for the class, including a form and a seeker (search view).
- Save the model.
- Start the WPF prototyper.
- Use the generated search view to create a Contact, enter a value such as Ada, and save it.
- Search for the record, open it, change the value, and save again.
This workflow gives you an executable model early. Add classes and associations as the requirements become clearer, then run the prototype again to validate the change.
Run the model in Turnkey
You can also run the same model as an HTML application with the Turnkey prototyper.
- In Mockotype, use Check MDriven Turnkey Core if the Turnkey application has not yet been downloaded.
- Ensure that the model has a ViewModel named Index.
- Give the Index ViewModel a clause; every ViewModel requires a clause.
- Put a control on the Index ViewModel, such as a text box, so that you can confirm that the designed page is displayed.
- Save the model.
- Start or refresh the Turnkey prototyper.
The Turnkey prototyper reloads the saved model and displays the Index page. If no ViewModel named Index exists, the Turnkey prototype cannot start.
To model a basic relationship, add a second class such as Order and draw an association between Contact and Order. For example, one contact can be connected to many orders. Add an attribute such as OrderNumber to Order, run Update AutoForms, save the model, and refresh the prototyper. The generated interface lets you create and work with the related objects.
Import and use data from a REST service
Mockotype can model JSON data and use it in a ViewModel action. This is useful when a prototype needs to retrieve structured information from an HTTP REST service.
A practical workflow is:
- Copy an example JSON response to the clipboard.
- Add a class and choose to add attributes and associations from the clipboard data. Mockotype interprets the JSON structure and creates classes, attributes, and associations that can hold the response.
- Create a ViewModel based on the root class created for the JSON result.
- Add a button action that calls
RestGet. Supply the URL and, when required, the user name, password, and nesting values accepted by the operation. - Store the returned JSON string in a String variable, for example
JsonResult. - Use the ViewModel operation that converts JSON into modeled objects. It matches JSON properties to the modeled properties and creates and populates the root object.
- Bind a grid or table to the result association and select the result attributes that you want to show.
- Add a global action that opens the ViewModel, then run the prototype and test the call.
Keep names that must match the JSON structure unchanged. In the demonstrated pattern, the result association name must match the JSON so that the returned data is populated into the modeled association.
Watch a REST-call walkthrough.
What Mockotype does not include
Mockotype intentionally hides advanced MDriven Designer capabilities. Use MDriven Designer when your work requires any of the following:
| Area | Not available in Mockotype |
|---|---|
| Database and server work | ReverseDatabase; local servers; MDrivenServer upload; MDrivenServer prototyping; SQL prototyping and Evolve; Data Migrate |
| Server-side application features | ServerSide ViewModels; debugger support towards a History-server; access groups; enterprise process information; state machines |
| Development-tool integration | CodeGen; Visual Studio integration |
When to use Mockotype
Use Mockotype when you need to understand and communicate requirements through a running model. It is suited to workshops where you model a domain with stakeholders, test a proposed workflow, and revise the model while the discussion is still active.
For example, instead of maintaining a long spreadsheet of requirements for customer and order handling, you can create the classes and relationships, generate forms, enter representative data, and let stakeholders test the behavior. The model keeps the concepts connected and provides a concrete artifact for discussing what the system must do.
When the prototype requires database evolution, server deployment, code generation, access control, or the other advanced capabilities listed above, open the compatible model in MDriven Designer.
Learn more
Mockotype is also introduced in the Mockotype and MDriven Designer update walkthrough.
