- Development: Server-Side Business Logic, as Processing Logic
- Development: Client-Side Business Logic
This approach is a prerogative of Snap4City development environment. In Snap4Ciy, it is possible to have one Proc.Logic (IoT App) referring to multiple Dashboards, and one Dashboard referring multiple Processing Logic (IoT Apps). For this purpose, the Snap4City libraries on Node-RED includes a number of dashboard nodes as reported in the figure below. They are used in the Proc.Logic / Node-RED and at the deploy they are also created into the Dashboard. How to work with widget/nodes is reported in the online help into the Node-RED visual programming environment.
According to the training https://www.snap4city.org/download/video/course/das/
- Any Action performed on Dashboard is provided to the Proc.Logic, which may produce reactions on Dashboard.
- The context of Proc.LogicßàDashboard is a singleton, thus any user connected to the Dashboard will observe the evolutions performed. So that all the users will see the same story and view, even if they are authenticated and authorized by using different credentials, and they are on multiple dislocated terminals.
- This is good for control rooms, and single/few users prototypes.
According to the training https://www.snap4city.org/download/video/course/das/ some of widgets are capable to:
- Send information and commands to the Dashboard Widget, for example for an action produced by the users. (IN widget/node)
- Receive information and commands from the Dashboard Widget, for example presenting a dashboard change to the users. (OUT widget/node).
- Send/receive information and commands to/from the Dashboard Widget, for example for collecting users’ actions and presenting a change to the users on the same widget (in/out widget/node).
On Server-Side (into Proc.Logic) the developer can even create dynamically HTML pages of any kind and embed them into a Dashboard Widget as external content. A mix of in, out, and in/out widgets can also be included in the same dashboard. This approach, shown in the figure below here, is very powerful and presents the behavior of Server-Side Business Logic for control room described above.