Basic Nodes
Basic nodes in Databraid provide fundamental functionality for working with data, performing simple operations, and facilitating the flow of information within a braid. These nodes serve as the building blocks for creating more complex and specialized braids.
Data Manipulation Nodes
Several basic nodes are designed for manipulating and working with different types of data:
-
ConstantNumber: Provides a constant numeric value that can be used as input to other nodes. It allows you to specify a fixed number that remains unchanged throughout the execution of the braid.
-
ConstantString: Similar to the ConstantNumber node, the ConstantString node provides a constant string value. It is useful for supplying fixed text or labels to other nodes in the braid.
-
ConstantData: Allows you to define a constant data object that can be of any supported data type, such as an array or an object. This node is useful for providing fixed data structures or configurations to other nodes.
-
ObjectProperty: Enables you to access and retrieve the value of a specific property from an object. It allows you to extract data from structured objects and use it as input to other nodes.
-
Cast: Performs type conversion between different data types. It allows you to explicitly convert data from one type to another, ensuring compatibility between nodes that expect specific data types.
Flow Control Nodes
Basic nodes also include nodes that help control the flow of data and execution within a braid:
-
Time: Provides the current time or a specific time value. It can be used to trigger time-based actions or to provide timestamps to other nodes.
-
Watch: Allows you to monitor and observe the value of a specific data point within the braid. It is useful for debugging and understanding how data flows through the nodes.
Output and Debugging Nodes
Databraid provides basic nodes for outputting data and facilitating debugging:
-
Console: Sends data to the console for logging and debugging purposes. It allows you to inspect the values flowing through the braid at specific points.
-
Alert: Displays an alert message to the user with the specified content. It is useful for providing notifications or prompting the user with important information.
Scripting Node
The basic nodes also include a scripting node that allows for custom functionality:
- NodeScript: Enables you to write custom JavaScript code within a node. It provides flexibility and extensibility, allowing you to perform complex operations, define custom logic, or integrate with external libraries.
These basic nodes form the foundation of Databraid and are essential for creating functional and interactive braids. They allow you to manipulate data, control the flow of execution, output information, and extend the functionality through scripting.
By combining and connecting these basic nodes with other specialized nodes, you can create powerful and tailored braids that solve specific problems or perform desired tasks. The basic nodes provide the necessary tools to handle data, control flow, and facilitate debugging, making it easier to develop and maintain braids in Databraid.
Remember to refer to the individual node documentation for more details on their specific inputs, outputs, and configuration options, as well as examples and best practices for using them effectively in your braids.