Documentation

To create an executable GUI dashboard application with decore Base, comparatively few steps are necessary. Essentially, the structure consists of defining the meta instances and defining the data model. The metadata is compiled by the interpreter by reading in decorated functions and stored as instances in the pool.

Description of the meta instances

Meta instances contain the types and attributes required to Build the GUI elements. The meta instances are usually built using decorated functions.

App

The application instance provides the metadata for the application. It is the root for everything to come and only accepts Bases. The app instance is built by the “Decorator” app().

Base

The Base instance provides the metadata for the Base. It is the carrier element for the Views. The base instance is built by the “Decorator” base().

Display in the frontend
  • The Base is basically the free area available for the Views.

  • It is listed directly under Root in the navigation as soon as it receives more than one View.

View

The View instance provides the metadata for the View. Actions and dialogs can be subordinated to it. The view instance is built by the “Decorator” view().

Display in the frontend
  • The View is listed in the navigation under Base.

  • The View is rendered in the Base view area.

Dialog

The dialog instance provides the metadata for the dialog. Further dialogs can be subordinated to it, which are then displayed in tabs. However, these are mainly used to carry the widgets. The dialog instance is built by the “Decorator” dialog().

Display in the frontend
  • The dialog can be shown in different display modes. For example, as a side-drawer or as a modal window.

  • This is called up by the positions or events defined with the activator attribute.

Widget

The widget instance provides the metadata for the widget. Further widgets can be subordinated to it, which are then displayed in a stack. A widget is required for manipulating the data set or data sets. The widget instance is built by the “Decorator” widget().

Display in the frontend
  • The widget is displayed in the content area of the dialog.

Action

The action instance provides the metadata for the action. It is the last link in the meta processing chain and is used to transmit the manipulations and Run actions in the backend. The action instance is built by the “Decorator” action().

Display in the frontend
  • Actions can be positioned in different places in the frontend using the activator attribute, but have no actual display, only button or event-controlled triggers.

Function

The function instance provides the metadata for functions that are run directly in the base as instance methods after the pool init. The function instance is built by the “Decorator” function().

Display in the frontend
  • Functions are not displayed or processed in the front end.

Processing sequence in the frontend

After opening an application, creating the base and creating further children, all paths lead to the action, which then communicates with the backend again to enable the data to be manipulated. Not every component object can be arbitrarily assigned to another. The frontend only processes the individual objects in a fixed order.

This overview shows the process of this processing.

flowchart TD; App-->Base; App-->Dialog; Base-->View; View-->Action; View-->Dialog; Dialog -->Widget; Widget-->Action; Widget-->Sub-Dialog; Sub-Dialog-->Sub-Widget; Sub-Widget-->Action; subgraph Widget; First-Widget-->Stacked-Widget; end subgraph Sub-Widget; First-Sub-Widget-->Stacked-Sub-Widget; end

Relational data processing in the widget

Data processing and data set generation in the widgets is an important part of the application and is referred to here as relational data processing. This generation of the editable data set is controlled firstly by the activator and secondly by the data source of the View in relation to the data source of the widget. This makes it possible to extend a dialog with further in the context of the actual selection and to make it more detailed.

The following chart describes this process.

Legend:
  • Item
    • empty = an empty data record is generated. (no default values).

    • first = the first data record of the widget source is loaded as a data record.

    • last = the last data record of the widget source is loaded as a data record.

    • default = a new data set with default values from the widget source is loaded as a data set.

    • item_by_id = a data record with a defined ID from the widget source is loaded as a data record.

  • Query
    • True = All occurring backref names and the ID of the selected data set of the View source are used to expand the widget’s query.

    • False = The ID of the selected data record is not used as a query attribute for the data retrieval.

  • Extend
    • True = automatic filling of the relational fields of the target data set with the View data set. For example: A ForeignKey field of the target dataset is filled with the view dataset.

    • False = no automatic filling of the data record.

flowchart LR; Dialog --> Activator{activator} Activator -->|empty| B1{Source} B1 --> |== view source| R1[Item: empty\nQuery: None\nExtend: False] B1 --> |!= view source| R2[Item: empty\nQuery: None\nExtend: False] Activator -->|first| B2{Source} B2 --> |== view source| R3[Item: first\nQuery: False\nExtend: False] B2 --> |!= view source| R4[Item: first\nQuery: True\nExtend: True] Activator -->|last| B3{Source} B3 --> |== view source| R5[Item: last\nQuery: False\nExtend: False] B3 --> |!= view source| R6[Item: last\nQuery: True\nExtend: True] Activator -->|default| B4{Source} B4 --> |== view source| R7[Item: default\nQuery: False\nExtend: False] B4 --> |!= view source| R8[Item: default\nQuery: True\nExtend: True] Activator -->|click| B5{Source} B5 --> |== view source| R9[Item: item_by_id\nQuery: False\nExtend: False] B5 --> |!= view source| R10[Item: last\nQuery: True\nExtend: True] Activator -->|context| B6{Source} B6 --> |== view source| R11[Item: item_by_id\nQuery: False\nExtend: False] B6 --> |!= view source| R12[Item: last\nQuery: True\nExtend: True]