Traversal Strategies

In version <= 0.4.0 scene-graph traversal is fixed to the wizard strategy and list item traversal is fixed to the simple strategy.

This is subject to change in upcoming versions.

There are currently two strategies for generating the GUI layout from the nodes in the scene-graph:

  • Wizard strategy
    • Expects a list of parallel group nodes that contain input nodes.
    • Each group node will generate a wizard step
  • Simple strategy
    • Expects a list of input nodes
    • For each input node a form control with a widget corresponding to the Domain Entity field is generated

Consider a form like this:

Mug:
    - parallel:
        - meta:
            title: Size of mug
        - input:
            field: height
            title: Mug Height
        - input:
            field: diameter
            title: Mug Diameter

    - parallel:
        - meta:
            title: Styling choices
        - input:
            field: has_handle
            title: Has Handle
        - input:
            field: label
            title: Text to print
        - input:
            field: color
            title: Color

The above description builds a scene-graph that the Konfoo web-client will follow when gathering input. The resulting scene-graph will look like this:

+-- ModelNode(Mug)
    |
    +-- GroupNode(parallel, title="Size of mug")
    |   |
    |   +-- InputNode(height)
    |   +-- InputNode(diameter)
    |
    +-- GroupNode(parallel, title="Styling choices")
        |
        +-- InputNode(has_handle)
        +-- InputNode(label)
        +-- InputNode(color)

The meta nodes are already merged into respective parent nodes.