Actions
No edit summary
No edit summary
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Actions in MDriven refer to things that a user or an API can execute to create an effect in the running system. Actions, in general, are the definition of what a user or an API can run within the model. 
=== What are Actions in MDriven? ===
Actions in MDriven refer to things a user or an API can execute to create an effect in the running system. Generally, actions are the definition of what a user or an API can run within the model. 


=== Different Kinds of Actions ===
There are a few different kinds of actions:    
There are a few different kinds of actions:    
* There are '''global actions''', also called the '''main menu actions'''. These are for the user to initiate something global in the application that is always available.   
# There are '''[[Global actions]]''', also called '''main menu actions'''. These are for the user to initiate something global in the always-available application.   
* We have the '''ViewModel actions'''. They are actions that need a ViewModel as context to be executed. They act either on objects in the model or by using variables like the <code>v_current</code> and <code>v_selected</code> variables in a ViewModel to execute things from what the user sees.   
# We have '''[[ViewModel actions]]''' which need a ViewModel as context to be executed. They act either on objects in the model or by using variables like the [[VCurrent and vSelected|v_current]] and [[VCurrent and vSelected|v_selected]] variables in a ViewModel to execute things from what the user sees.   
* Then there are '''class actions''' or model actions, as they could also be referred to. They are actions that are available everywhere where a class is known to the user interface.  
# Then there are '''[[Documentation:Class actions|Class actions]]''' or '''model actions''', as they could also be referred to. These are actions that are available everywhere a class is known to the user interface.
These are the three kinds of actions one can define in the model. There are different ways to execute these actions. They can be executed simply by the user clicking on the action in the user interface - those are usually opted in or opted out of the views and are provided by the framework system to be available in menus. The other way to execute is to put a button on the view and then refer to the action by selecting it in the drop-down menu or by providing action language right in the button. That is the ViewModel action that doesn't have a full action definition.
#* These are the three kinds of actions one can define in the model. There are different ways to execute these actions. 
* We have '''periodic actions''' which is a definition in a view model that runs an action on a set interval depending on settings in the view itself. It is a way, for example, to automatically execute an action based on changes in data.
#** They can be executed simply by the user clicking on the action in the user interface - those are usually opted in or opted out of the views and are provided by the framework system to be available in menus.   
* Then there are '''server-side actions'''. And server-side here refers to the MDriven server. So these are ways to run things on a schedule, for example, to say that every minute, check this condition, and execute these actions. The ViewModel server-side periodic action has a way to find the information to act upon. The ViewModel defines the scope of the information that the action is using and then the action code - the EAL code.
#** The other way to execute is to put a button on the view and then refer to the action by selecting it in the drop-down menu or by providing action language right in the button (that is the ViewModel action that doesn't have a full action definition).  
And then there are ways to trigger the execution of actions in addition to these types of actions and when what scope they execute. And that is you can execute actions from EAL and you can ask from code if an action can be executed. You can also say that for example, an action should be a response to a dragging or a drag-drop action. You can define that an action should be executed based on a swipe on a mobile device. And when an action executes, it can either execute code as EAL or it can execute a standard function in the framework. That is to save, cancel, undo, redo, and operations like that that you select from a drop-down menu. 
# '''[[Periodic action|Periodic actions]]''' are a definition in a ViewModel that runs an action on a set interval depending on settings in the view itself. It is a way, for example, to automatically execute an action based on changes in data.  
# Then there are '''[[MDrivenServer periodic server-side actions|Server-side actions]]''' (server-side here refers to the MDriven server). These are ways to run things on a schedule, for example, to say that every minute, check this condition, and execute these actions. The ViewModel server-side periodic action has a way to find the information to act upon. The ViewModel defines the scope of the information that the action is using and then the action code - the EAL code.  
There are ways to trigger the execution of actions in addition to these types of actions and what scope they execute. That is, you can execute actions from EAL and ask from code if an action can be executed. You can also say that for example, an action should be a response to a dragging or a drag-drop action. You can define that an action should be executed based on a swipe on a mobile device. When an action executes, it can either execute code as EAL or execute a [[Standard actions|standard function]] in the framework - that is, to save, cancel, undo, redo, and operations like that that you select from a drop-down menu.  
 
=== Naming actions and their presentation ===
* [[Action names]]
 
=== What actions can do ===
* Read more here for the details: [[What an Action can do]]
 
=== The context/scope of actions ===
* [[Act as For Actions]]
 
===== See also: =====
* '''[[Global actions]]''' 
* '''[[Documentation:Class actions|Class actions]]''' 
* '''[[ViewModel actions]]'''  
* '''[[Periodic action|Periodic actions]]''' 
* '''[[MDrivenServer periodic server-side actions|Server-side actions]]'''
[[Category:Actions]]
[[Category:Actions]]
{{Edited|July|12|2024}}
[[Category:TOC]]

Latest revision as of 06:03, 5 April 2024

What are Actions in MDriven?

Actions in MDriven refer to things a user or an API can execute to create an effect in the running system. Generally, actions are the definition of what a user or an API can run within the model. 

Different Kinds of Actions

There are a few different kinds of actions: 

  1. There are Global actions, also called main menu actions. These are for the user to initiate something global in the always-available application. 
  2. We have ViewModel actions which need a ViewModel as context to be executed. They act either on objects in the model or by using variables like the v_current and v_selected variables in a ViewModel to execute things from what the user sees. 
  3. Then there are Class actions or model actions, as they could also be referred to. These are actions that are available everywhere a class is known to the user interface.
    • These are the three kinds of actions one can define in the model. There are different ways to execute these actions. 
      • They can be executed simply by the user clicking on the action in the user interface - those are usually opted in or opted out of the views and are provided by the framework system to be available in menus.   
      • The other way to execute is to put a button on the view and then refer to the action by selecting it in the drop-down menu or by providing action language right in the button (that is the ViewModel action that doesn't have a full action definition).  
  4. Periodic actions are a definition in a ViewModel that runs an action on a set interval depending on settings in the view itself. It is a way, for example, to automatically execute an action based on changes in data.  
  5. Then there are Server-side actions (server-side here refers to the MDriven server). These are ways to run things on a schedule, for example, to say that every minute, check this condition, and execute these actions. The ViewModel server-side periodic action has a way to find the information to act upon. The ViewModel defines the scope of the information that the action is using and then the action code - the EAL code.  

There are ways to trigger the execution of actions in addition to these types of actions and what scope they execute. That is, you can execute actions from EAL and ask from code if an action can be executed. You can also say that for example, an action should be a response to a dragging or a drag-drop action. You can define that an action should be executed based on a swipe on a mobile device. When an action executes, it can either execute code as EAL or execute a standard function in the framework - that is, to save, cancel, undo, redo, and operations like that that you select from a drop-down menu.  

Naming actions and their presentation

What actions can do

The context/scope of actions

See also:
This page was edited 43 days ago on 04/05/2024. What links here