Rendering the MDriven Turnkey application yourself

MDriven Turnkey is both the complete rule engine that executes your model AND the rendering engine to create the UI based on your declarative viewmodels from your model. To really stand out you may want to own your UI rendering. This article describes how you get runtime access to enough meta information from the model to create your own engine for UI.

Main menu

To integrate a Turnkey application into an existing site you may want to take control over how the main menu is merged with other actions on your site.

https://licenseandticket.azurewebsites.net/MDriven/GlobalActionsMeta

If you use the MVC action MDriven/GlobalActionsMeta you get all the needed meta information

Rendering MT -1 .png

This is good information for those of you that do not want to hard code access to certain views in your application but rather would like to create generic logic that will discover all existing and new views that you have in the model. Implementing your own motor to do this is the way to go to fully utilize the generic nature MDriven model driven applications.

Views

You may also want to create your own motor to render the UI of a view. To get access to the needed meta information you would go like this https://licenseandticket.azurewebsites.net/MDriven/ViewMeta?view=RuntimeKey where RuntimeKey is the name of the View – that you can find the GlobalActionsMeta.

The results from ViewMeta looks like this:

Rendering MT - 2.png

This is the strategy used by the WPF turnkey client discussed here WPFMahappAndGantt

And you will find all code for this on the download page under the name “MDriven Turnkey Client Code”

Note that TaggedValues you set on ViewModelColumns will show up in the meta information – and this way you can keep your own instructions in the model in MDriven Designer.

This page was edited 76 days ago on 02/10/2024. What links here