Nanoflows

Nanoflows are similar to microflows, they permit you to express logic precisely. They run directly on the browser/app which makes it perfect for UI validation and offline logic since they don’t require a connection to the backend/server. Elements, when arranged as per the necessity of the applications during a flow to create a logic and this flow created, is termed a Nanoflows.

Three Types Of Flows Within Mendix:

  • Workflows – Workflows are the processes and tasks seen in large-scale, persisted automation scenarios.
  • Microflows – Microflows are the address automation use cases also, but they are short-lived, run on the server, and are typically triggered by the user, through an API or by an occurrence. They typically perform a variety of actions, including multiple database operations.
Nanoflow types
  • Nanoflows – Nanoflows are intended to be triggered by the user and typically have a short lifespan making them perfect for client-side-based actions like UI transitions. Nanoflows extend visually modeled logic to the sting. Increase responsiveness for UI interactions because of client-side execution. No server connection is required allowing extended use cases of offline apps. Support hot reloading within the modeler allowing faster development/test cycles.

Nanoflows make it easy to make more dynamic and responsive apps by providing the simplest way to model complex validation or calculations with instant feedback, build interactive and dynamic user interfaces on top of intelligent navigation, and build smooth, state-to-state UI transitions. Because nanoflows run on the client, they are doing not require an online connection and are perfect to be used in offline apps too. While nanoflows are great for offline and hybrid apps.

Differences between Microflow and Nanoflow:

Properties

  • Run-on
  • Language
  • Offline mobile apps
  • Security
  • Transaction
  • Execution of actions in the client (Eg: close page)

Microflow

  • Client (browser/device)
  • JavaScript
  • Supported
  • Executed in the user context
  • Every call a transaction
  • Directly

Nanoflow

  • Server
  • Java/Scala
  • Not available
  • Default executed in the system context
  • Single transaction
  • After the microflow is executed

When To Use Nanoflows:

Currently, nanoflows are most beneficial in offline apps but can also be useful for executing logic that does not retrieve plenty of information.

Offline Mobile Application

Nanoflows are designed with offline applications as we can model them according to the application logic that works on these offline applications. Since all the database-related operations are executed on the local database so nanoflows in offline apps will be faster.

Logic Where No Connection Is Needed

Logic Where No Connection Is Needed – Nanoflows also provide greater value to online applications. When one executes the database related operations, each operation will create a separate network request to the Mendix Runtime.

Think Microflow

  • When there are multiple calls to the DB/server
  • Deleting objects
  • When java actions are needed
  • To make calls to sub-flows
  • Integrations

Yes Nanoflows

  • Smart Validation
  • Perform calculations
  • Retrieve* and manipulate data
  • Navigation/UI logic
  • Offline Apps.

Working of Nanoflows:

Operations Interact With The Database:

  • Create
  • Commit
  • Retrieve
  • Rollback
New Feature in Mendix Version 9 and above:

In Mendix Version 9 and above, a nanoflow debugger is added to help the developers in debugging the issues that were found in nanoflow and in the version of Mendix 9 below there was only a Microflow debugger and which would only help microflows to debug.

Keyboard Support:
Key(s)Effect
Arrow KeysSelects the nearby element (activity, event, loop) in the direction of the arrow
EnterEdits the properties of the selected element
F2Renames the item returned by the selected element
Shift+F2Edits the caption of the selected element
Ctrl+arrow keysMoves the selected element in the direction of the arrow
TabIf a loop is selected, the first element inside the loop is selected
Shift+TabIf an element inside a loop is selected, the loop itself is selected
HomeSelects the start event
EndCycles through the end events
Shift+F10Opens the context menu for the currently selected element

Leave a Reply

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

Fill out this field
Fill out this field
Please enter a valid email address.

keyboard_arrow_up