MDrivenWiki
Log in

Windows WPF client

From MDrivenWiki

The Windows WPF client consists of two logical parts.

Part 1 is a 2 threaded listener and information tree builder that by streaming changes from the turnkey server holds a local replica of the information in the viewmodel.

Whenever the user changes something in this replica commands are generated, queued and sent to the server, that in turn process the commands and update the main viewmodel based information tree that lives on the server. The changes the server information tree sees generates commands that are collected by the client - and the client merges the changes into its own viewmodel information tree replica.

Part 2 of the WPF client reads meta information about available main menu actions (Global actions) and also meta information per view it is set to display. Using this meta information - that really is just a condesate of the viewmodel definition from MDriven Designer - it builds a WPF based UI with editboxes and other UI widgets. These widgets are databound to the replicated information tree described in part 1.

The user edits information thru the UI widgets - bound to the information tree - that generates client commands that are sent to the server at the earliest possible time - but always in the order they were created. These client commands are handled by the server and when applied all effects and side effects that happens on the server generates server commands - that the client fetch as soon as it sees any reason to ask.

The code for the WPF client is open and can be downloaded from here http://www.new.capableobjects.com/xdownloads/MDrivenTurnkeyClientCode_20161206.zip

Default viewmodel for the application background

If you name a viewmodel DefaultBackgroundViewModel, this viewmodel will be used as the application background.