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

image

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:

image

This is the strategy used by the WPF turnkey client discussed here http://www.new.capableobjects.com/2016/06/25/turnkey-with-wpfand-mahappand-any-third-part-xaml/

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 entry was posted in MDrivenTurnkey and tagged , . Bookmark the permalink.
Add Comment Register



Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>