You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/nanoflows/_index.md
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ description: "Presents an overview of all the elements that can be used in a nan
8
8
9
9
## Introduction
10
10
11
-
Nanoflows are similar to [microflows](/refguide/microflows/), in that they allow you to express the logic of your application. However, they do have some specific benefits (for example, they run directly on the browser/device and can be used in an offline app). Furthermore, most of the actions run directly on the device, so there is also a speed benefit for logic which does not need access to the server. For more information on how nanoflows and microflows differ, see the [Differences between Microflows and Nanoflows](/refguide/microflows-and-nanoflows/#differences) section in *Microflows and Nanoflows*.
11
+
Nanoflows are similar to [microflows](/refguide/microflows/), in that they allow you to express the logic of your application. However, they do have some specific benefits. For example, they run directly on a browser/device and hence can be used in an offline app. Furthermore, since most of the activities run directly on the device, there is also a speed benefit for logic which does not need access to the server. For more information on how nanoflows and microflows differ, see the [Differences between Microflows and Nanoflows](/refguide/microflows-and-nanoflows/#differences) section in *Microflows and Nanoflows*.
12
12
13
13
This page is an overview of all the elements that can be used in a nanoflow. For the properties of the nanoflow itself, see [Nanoflow Properties](/refguide/nanoflow/).
14
14
@@ -18,28 +18,32 @@ For information on using nanoflows as data sources, see [Nanoflow Source](/refgu
18
18
19
19
### Offline Mobile Apps
20
20
21
-
Nanoflows are designed with offline-first applications in mind, as they allow you to model application logic that works in offline apps. Since all database-related actions will be executed on the local offline database, nanoflows in offline apps will be fast.
21
+
Nanoflows are designed with offline-first applications in mind, as they allow you to model application logic that works in offline apps. Since all database-related activities will be executed on the local offline database, nanoflows in offline apps will be fast.
22
22
23
23
### Logic Where No Connection Is Needed
24
24
25
-
Nanoflows also offer great value to online applications (for example, for UI logic, validations, calculations, and navigation). However, please keep in mind that, when you perform database-related actions, each action will create a separate network request to the Mendix Runtime.
25
+
Nanoflows also offer great value to online applications (for example, for UI logic, validations, calculations, and navigation). However, please keep in mind that, when you perform database-related activities, each activity creates a separate network request to the Mendix Runtime.
26
26
27
-
The following actions interact with the database:
27
+
The following activities interact with the database:
Therefore, the best practice is to use nanoflows in online applications when they do not contain the above actions.
34
+
Therefore, the best practice is to use nanoflows in online applications when they do not contain the above activities.
35
35
36
36
{{% alert color="info" %}}
37
-
Changing objects without committing is not a database-related action, as changes are applied on the device or in the browser.
37
+
An exception for the **Create object** activity is that you can use it to create a new [non-persistable entity](/refguide/persistability/#non-persistable), and this NPE has no error handlers, calculated attributes, or read-only attributes. In this case, no request is sent to the Mendix Runtime.
38
+
{{% /alert %}}
39
+
40
+
{{% alert color="info" %}}
41
+
Changing objects without committing is not a database-related activity, as changes are applied on the device or in the browser.
38
42
{{% /alert %}}
39
43
40
44
#### Other Cases
41
45
42
-
Although nanoflows perform best in online applications when no database-related actions are used, and these are generally the best cases, nanoflows that contain at most one database-related action can also still perform well. Because such nanoflows only require one network call, they perform as well as a microflow. An example of such a use case is performing validation logic on an object and committing the object in the same nanoflow.
46
+
Although nanoflows perform best in online applications when no database-related activities are used, and these are generally the best cases, nanoflows that contain at most one database-related activity can also still perform well. Because such nanoflows only require one network call, they perform as well as a microflow. An example of such a use case is performing validation logic on an object and committing the object in the same nanoflow.
43
47
44
48
## Notation and Categories
45
49
@@ -134,7 +138,7 @@ To convert a nanoflow to a microflow, you have two options. The first option is
134
138
135
139
{{< figure src="/attachments/refguide/modeling/application-logic/microflows-and-nanoflows/nanoflows/convert-to-microflow.PNG" alt="Convert to microflow" width="550px" class="no-border" >}}
136
140
137
-
A new microflow is created and added to the same directory, and you can get consistency errors if there are actions that are not supported by microflows.
141
+
A new microflow is created and added to the same directory, and you can get consistency errors if there are elements that are not supported by microflows.
0 commit comments