Overview
Node-based programming is a visual approach to programming that uses interconnected nodes to represent different actions and data flows. These nodes are essentially "blocks" of code that perform specific tasks and they are linked together to create Directed Acyclic Graph (DAG), where data flows from one node to another.
A node represents a small function that transforms inputs into outputs, optionally using additional parameters. In ObjectTalk, nodes are visually represented by rectangles displaying a title at the top, inputs displayed on the left and outputs on the rights. Inputs and outputs are referred to as pins that can be connected and can carry only one datatype.
Each node really feels like an object instance and drawing connections between them is akin to visual programming. Today, in ObjectTalk, the IDE has an node editor that allows you to setup nodes and connect them into a graph. These graphs are automatically reevaluated when values change. The examples folder contains image processing chains and nodes are used in the scene examples to process images or create geometry. ObjectTalk already has over 90 nodes already and many will follow depending on my needs.
Users can draw connections between nodes (called links) and the editor ensures that output and input nodes have compatible data types, that inputs have a maximum of one connection and that the created graph does not include recursion (i.e stays acyclic). As links are created/moved/deleted or values altered, the editor automatically (re-)evaluates the graphs given the user a realtime programming experience.
A node is depicted as a rounded rectangle with a title bar at the top, optional inputs on the left, optional outputs on the right and optional parameters in the middle of the rectangle.
Title Bar
At the top of the node is a title bar which by default contains the name of the node. By double clicking on the title, users can name a node anything they want to better express its function in a graph. The background of the title bar is color coded to represent the category of the node (see below).
Input Pins
Optional inputs to a node are represented on the left side of that node by what's called pins. Each pin represents an input with a specified type that is color coded (see pin types below). Input pins can only receive data from one output pin. and the pin data types have to match (which is enforced by the IDE).
If an input pin is not connected and the data types allows easy specification by the user, a field will be visible to the right of the pin's name to allow the user to specify a value.
Output Pins
Optional output from a node are represented on the right side of the node by pins. Each pin represents an output with a specified type that is color coded (see pin types below). Output pins can be connected to multiple input pins as long as the data types match (also enforced by th IDE).
Node Parameters
Some nodes also might have additional parameters or visualizations to help the node perform its function. The node parameters are rendered in the middle of the node.
Nodes are grouped in categories that make it easier to find them and recognize them in a graph. Each category has a unique color as shown on the right below.