Declarative Contexts
Overview
In Declaration context, a node's mere existence denotes entity, and connections are optional when used to feed things. Technically, nodes represent creation of objects or operations calculating object properties, while connections represent flow of data.
If you are familiar with other visual programming systems, this is kind of like TerraGen or Houdini.
Explanation
In Declaration graphs with connections, it works like Flows context.
Subcontexts
- Components: An object described by what it assembles: every output nothing else takes becomes a field of the defined type, and constructing an instance - which another graph does - is what runs the graph. Its nodes are drawn as titles only, top to bottom, with their values, properties and events set in the Properties panel, and it holds no node that is there for an effect.
Two kinds that describe things too are filed under Special (Experimental) while they are experimental:
- StateMachine: States joined by named transitions, each guarded by a condition. Each state's behaviour is a graph of its own, and the machine's data members are what the states share. A run enters the first state, runs it, and takes the first transition whose condition holds.
- Constructs: An object tree assembled from constructors, factories, builders and values alone - a description other graphs read. A builder takes an object and answers it changed, as Add Class does to an HTML element or Style Layer to a chart layer, and Choose Value, Switch Value and Select Output count as values. Which tools those are is decided tool by tool: a node that computes or acts is not offered on a Constructs graph, and one a document already holds there is marked on the canvas and warned about, and still runs.
Earlier versions of this page described Record and Module subcontexts, and filed StateMachine and Constructs here. See Graph Contexts for all nine graph types.
Features
See Also
- Other Graph Contexts: Procedural and Dataflow
- Procedural contexts: Events Graph and Routine Graph
- Dataflow contexts: Flows Graph and Function Graph