TK Live View
No edit summary
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
I have been showing what has been growing slowly in the designing of the web UI and while the app is running. This is more of the same. We have taken it a bit further and consolidated some of the functions that I think one needs when fine-tuning the look and feel of a web application.  
<message>Write the content here to display this box</message>
The Turnkey Live View enables you to design the web UI while your app is running. It makes changes to the different interfaces of the application through the different ViewModels and allows you to view the results of the changes in real time. It is useful for designing and testing the app's UI responsiveness and testing UI concepts.  


There are four foldup sections in the TK Live View: '''Live Edit''', '''Server Setup''', '''Assets TK Synk''', and '''Debug Information'''.  
The Turnkey Live View is accessible through the '''Turnkey Live View Editor''' button. It is an embedded browser within the designer for editing the UI.
[[File:turnkey-live-editor-button-in-designer.png|alt=Turnkey Live Editor Button in the MDriven Designer|none|thumb|933x933px]]
 
'''NOTE:''' The Turnkey application has to be running in order to use the Turnkey Live View.
 
=== Turnkey Live View Features: ===
* Server Setup
* Live Edit
* AssetsTK Synk
* Debug Information
 
=== Server Setup ===
The Server Setup section starts the Turnkey application. You can either use the local Turnkey prototyper (default) or use the MDriven Server setting to start the app.
[[File:turnkey-live-editor-server-setup-section.png|alt=Turnkey Live Editor ServerSetup Section|none|thumb|905x905px]]


=== The Turnkey Live Editor ===
We have an icon that calls the Turnkey Live Editor. This is sort of a hybrid between the ViewModel Editor, where you change the definition of the views, but this way, you can run the application. It is a combination of the run button which we had before - where you prototype and start the system in either WPF or in the local Turnkey prototyper. When the icon is pushed, you get a corresponding ViewModel connected to it because they share some of the logic. <blockquote>It is basically an embedded browser, the new WebView2, Microsoft's embedded Edge browser, which is replacing the old Internet Explorer and Edge. </blockquote>
=== Live Edit===
=== Live Edit===
If you choose to fold down the Live Edit tab, you get the view model tree, and a few, interesting settings per ViewModel column.
The Live Edit section is where the actual fine tuning of the UI is done in real time, either from the ViewModel tree or the the actual generated UI.


When you click something in the ViewModel tree, you can see where it is positioned on the X and Y axis. You don't have to refresh - and that's the beauty of running within a harness like this, because MDriven can do the push and refresh for you to make things move smoother. You can also move things around, and since it is a running application, you can, for example, expect to find actions, create new things, and save those.
For editing and designing, Live Edit has three sections:
=== Server Setup ===
 
When you click on Server Setup, it has a similar look to that of the play button for the system prototyper. You can check if you have the current Turnkey core installed. It is optional; you can either run it towards a local XML file or use the MDriven Server which will use the settings from the cloud connection for data.  
* The ViewModel tree
* The Web UI
* Advanced Edit
[[File:turnkey-live-editor-live-edit-section.png|alt=Turnkey Live Editor Live Edit Section|none|thumb|881x881px]]
 
===== The ViewModel tree =====
The ViewModel tree provides access to the ViewModel Editor interface of a ViewModel. It provides all the options and settings of the ViewModel Editor such as adding and rearranging columns, adding nestings, placing containers and more.
 
===== Advanced Edit =====
The Advanced Edit section is for ViewModel and ViewModel column properties settings and constraint settings. This is also another feature adopted from the ViewModel Editor.


If you choose the MDriven Server, the "Settings for MDrivenServer" button will light up in blue when you hover over it. Click on it and a new window labeled CloudForm will open. This is where you can set the server you want to run against. 
===== The Web UI =====
This section shows you the UI as it will be seen by users. Direct editing is available in this section for dragging and repositioning UI widgets:


Or you can choose to use the XML. "Re(Start) MDriven Turnkey Core", and you may see new text that highlights in red when it discovers that there is a server running, or the settings from before don't match the file you are actually working on (you may be working on a file that's stored in the internet cache  - a sample model for association). Restart the server, and once that is done, fold the Server Setup tab again, and then the popup window starts with your application in the browser. 
* Turn on '''Edit''' to edit in Web UI
* Turning on the '''Live Update''' feature enables you to view ViewModel changes in real time.
[[File:turnkey-live-editor-live-edit-section-additional-settings.png|alt=Additional Settings of Live Edit in Turnkey Live View|none|thumb|912x912px]]


=== AssetsTK Synk===
=== AssetsTK Synk===
This ability has been available with Assets for a long time, but they were challenging - you had to read the wiki and manually implement it. They are fully functional now and this is where they can fit seamlessly into the overall workflow.
This section of the AssetsTK folder shows configurations for the current running Model. When this section is expanded, the AssetsTK folder is automatically created if it does not exist.


When you turn on AssetsTK Synk, the application ensures an Assets TK folder which has the same name as your model, but with underscore AssetsTK ("_AssetsTK") because that's the trigger for it to be discovered once we upload the model to the cloud, etc. This is just basically a file tree where you can F5 it to to make sure you see everything.  
This section provides options to create asset files for customizing the Turnkey application UI and merging models into the current running Model.


To the right are buttons for common things that we put in the Assets, for example, the tkusercss. If you click on it and press on the AssetsTK folder, you would see a "content" folder which would then open a tkusercss file in Notepad (or you can associate it with a better tool like Visual Studio or Visual Studio code). It's beneficial because the tkusercss file can be made to to sync and discover changes in the Notepad file and when it syncs, it will upload it to the server and make it active for the server immediately.
===== The AssetsTK Synk features: =====
 
* '''Refresh file tree:''' This is for refreshing the [[Documentation:AssetsTK|AssetsTK file]] tree to view all content currently in the folder.
* '''Ensure Content/tkuserCss.css:''' Creates the [[Documentation:Tkusercss|tkusercss file]] for creating personalized CSS that can be merged into the Turnkey applications
* '''Ensure Content/theme-user.css:''' Creates the [[Documentation:MDriven Turnkey theming|theme-user css file]] for editing the default Turnkey theme properties.
* '''Ensure EXTScripts/appwideangularscriptincludes.html:''' Create the [[Documentation:AppWideAngularScriptIncludes|AppWideAngularScriptIncludes html file]] for loading scripts in the page rendering.
* '''Ensure ViewAssets/<NameOfViewModel> (css.js):''' Creates ViewModel CSS and JS files for overriding the UI.
* '''Ensure Views/EXTOverridePages/<NameOfViewModel>.tagexpander.cshtml:''' Creates the current ViewModel [[Documentation:Fashion with tagexpander|tageexpander file]] for overriding the default Turnkey UI implementation.
* '''Ensure EXTComponents/TemplateComponent (css,html,js):''' Creates the folder and files structure for creating an [[Documentation:EXT Components|Angular component]] to integrate in the Turnkey application.
* '''(Re)Download Components from GitHub:''' Downloads the latest mergeable models onto your local machine.
* '''Components to choose from:''' This section provides MDriven models available for merging into the current model. These include examples and patterns for integrating other MDriven functionality into the app. ''First '''Download Components from GitHub''' before using this feature.''
[[File:turnkey-live-editor-server-assetstk-synk-section.png|alt=Turnkey Live Editor Server AssetsTK Synk Section|none|thumb|866x866px]]


=== Debug Information ===
=== Debug Information ===
The fourth tab under the Turnkey Live Editor button is the Debug Information. It is the same debugger that's available from pressing the play button (select XML, click on Select system, then choose Debugger). If you use the server setup and run it against an MDriven server, then you will want to run the debugger against that MDriven server and have access to the same data. This feature made it easier to make sure that the settings are the same for for everyone. 
The Debugger UI provides access to the model using the '''Server Setup''' settings used to start the Turnkey application. This section adopts all the functionality of the Model debugger to check for errors, creating, reading and updating Model data including testing ViewModels.  


All in all, the Turnkey Live Edit is ''not'' where you start to design your whole application because it can be difficult to get started. However, it is a place where you can finetune your application and certainly work with the styling, the debugger, and with the Javascript files because it's really good to use the Chrome Debugger to to step the Javascript files to see where you're going wrong. This is a step forward in taking care of the whole process to get a finished system.
=== Watch this video to learn more ===
 
=== Watch the video to learn more. ===
<html>
<html>
<div class="video">
<div class="video">
Line 39: Line 73:
{{Edited|July|12|2024}}
{{Edited|July|12|2024}}
[[Category:MDriven Designer]]
[[Category:MDriven Designer]]
[[Category:TOC]]

Latest revision as of 06:18, 27 August 2024


The Turnkey Live View enables you to design the web UI while your app is running. It makes changes to the different interfaces of the application through the different ViewModels and allows you to view the results of the changes in real time. It is useful for designing and testing the app's UI responsiveness and testing UI concepts.

The Turnkey Live View is accessible through the Turnkey Live View Editor button. It is an embedded browser within the designer for editing the UI.

Turnkey Live Editor Button in the MDriven Designer

NOTE: The Turnkey application has to be running in order to use the Turnkey Live View.

Turnkey Live View Features:

  • Server Setup
  • Live Edit
  • AssetsTK Synk
  • Debug Information

Server Setup

The Server Setup section starts the Turnkey application. You can either use the local Turnkey prototyper (default) or use the MDriven Server setting to start the app.

Turnkey Live Editor ServerSetup Section

Live Edit

The Live Edit section is where the actual fine tuning of the UI is done in real time, either from the ViewModel tree or the the actual generated UI.

For editing and designing, Live Edit has three sections:

  • The ViewModel tree
  • The Web UI
  • Advanced Edit
Turnkey Live Editor Live Edit Section
The ViewModel tree

The ViewModel tree provides access to the ViewModel Editor interface of a ViewModel. It provides all the options and settings of the ViewModel Editor such as adding and rearranging columns, adding nestings, placing containers and more.

Advanced Edit

The Advanced Edit section is for ViewModel and ViewModel column properties settings and constraint settings. This is also another feature adopted from the ViewModel Editor.

The Web UI

This section shows you the UI as it will be seen by users. Direct editing is available in this section for dragging and repositioning UI widgets:

  • Turn on Edit to edit in Web UI
  • Turning on the Live Update feature enables you to view ViewModel changes in real time.
Additional Settings of Live Edit in Turnkey Live View

AssetsTK Synk

This section of the AssetsTK folder shows configurations for the current running Model. When this section is expanded, the AssetsTK folder is automatically created if it does not exist.

This section provides options to create asset files for customizing the Turnkey application UI and merging models into the current running Model.

The AssetsTK Synk features:
  • Refresh file tree: This is for refreshing the AssetsTK file tree to view all content currently in the folder.
  • Ensure Content/tkuserCss.css: Creates the tkusercss file for creating personalized CSS that can be merged into the Turnkey applications
  • Ensure Content/theme-user.css: Creates the theme-user css file for editing the default Turnkey theme properties.
  • Ensure EXTScripts/appwideangularscriptincludes.html: Create the AppWideAngularScriptIncludes html file for loading scripts in the page rendering.
  • Ensure ViewAssets/<NameOfViewModel> (css.js): Creates ViewModel CSS and JS files for overriding the UI.
  • Ensure Views/EXTOverridePages/<NameOfViewModel>.tagexpander.cshtml: Creates the current ViewModel tageexpander file for overriding the default Turnkey UI implementation.
  • Ensure EXTComponents/TemplateComponent (css,html,js): Creates the folder and files structure for creating an Angular component to integrate in the Turnkey application.
  • (Re)Download Components from GitHub: Downloads the latest mergeable models onto your local machine.
  • Components to choose from: This section provides MDriven models available for merging into the current model. These include examples and patterns for integrating other MDriven functionality into the app. First Download Components from GitHub before using this feature.
Turnkey Live Editor Server AssetsTK Synk Section

Debug Information

The Debugger UI provides access to the model using the Server Setup settings used to start the Turnkey application. This section adopts all the functionality of the Model debugger to check for errors, creating, reading and updating Model data including testing ViewModels.

Watch this video to learn more

This page was edited 24 days ago on 08/27/2024. What links here