Rendering the MDriven Turnkey application yourself
No edit summary
No edit summary
Line 1: Line 1:
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.
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 stand out, you may want to own your UI rendering. This article describes how to get runtime access to enough meta information from the model to create your own engine for UI.


== Main menu ==
== 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.
To integrate a Turnkey application into an existing site, you may want to control how the main menu is merged with other actions on your site.


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


If you use the MVC action MDriven/GlobalActionsMeta you get all the needed meta information
If you use the MVC action MDriven/GlobalActionsMeta, you get all the needed meta information.
[[File:Rendering MT -1 .png|none|frame]]
[[File:Rendering MT -1 .png|none|frame]]


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.
This is good information if you do not want hard code to have access to certain views in your application but would rather create generic logic that will discover all existing and new views you have in the model. Implementing your own motor to do this is the way to go to fully utilize the generic nature of MDriven model-driven applications.


== Views ==
== 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.
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 do 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:
The results from ViewMeta look like this:
[[File:Rendering MT - 2.png|none|frame|576x576px]]
[[File:Rendering MT - 2.png|none|frame|576x576px]]


This is the strategy used by the WPF turnkey client discussed here [[WPFMahappAndGantt]]
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”
And you will find all the 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.
Note that the TaggedValues you set on ViewModelColumns will show up in the meta information - this way, you can keep your own instructions in the model in MDriven Designer.
[[Category:MDriven Turnkey]]
[[Category:MDriven Turnkey]]

Revision as of 08:54, 15 February 2023

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 stand out, you may want to own your UI rendering. This article describes how to 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 control 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 if you do not want hard code to have access to certain views in your application but would rather create generic logic that will discover all existing and new views you have in the model. Implementing your own motor to do this is the way to go to fully utilize the generic nature of 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 do 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 look like this:

Rendering MT - 2.png

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

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

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

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