Skip to main content
Documentation

Elements

Diafunc projects are built up of three types of elements: entities, links and events.
They are the basic building blocks to build even the most complex constructs from them.
The three Diafunc element types: entities, links and events

Types

Elements can be typed as desired. Either user-defined types can be created, the meaning of which is project-specific, or predefined types can be used, for which the platform provides additional functionalities.
Predefined entity types are for example: notebook, function, model, scene, chart, ...
Element typing with user-defined and predefined entity types

Attributes

Elements may have all kinds of attributes. Attributes are basically key-value pairs. They are the main way of storing information at diafunc.
An element with its key-value attributes

Meta Attributes

Attributes may also have attributes, which are called meta attributes. They can be used to store information about particular attributes, for example: dimension, scale, description, visibility, ...
An element attribute with its nested meta attributes

Tags

Elements can be tagged. Tags can for example be used to semantically cluster elements or to attach additional information to them.
An element labelled with tags

Entities

Entities are the graph's nodes and the central information units at Diafunc — notebooks, functions, tables, models, charts and scenes are all entities. Their identification, predefined types and contents are covered in detail at the Entities page.

Links

Links connect entities and thereby build up the project graph. Each link is directed and links a source entity to a target entity, but the graph can be traversed in both directions, forward and backward.
A link is identified by its source entity, its target entity and a link id. Multiple parallel links between the same entities in the same direction can exist with different link ids.
A directed link connecting a source entity to a target entity

Events

Events are ephemeral information units with a limited durability. They can be fired by functions, can trigger function evaluations and are removed automatically once they have expired.
An event is always related to an entity. Global events could for example be related to the project entity, while specific events could be related to the affected entity.
Events are identified by an entity and an event id. A particular event occurrence is additionally identified by its occurrence id, and multiple occurrences may exist for the same event id.
An ephemeral event related to an entity with occurrence ids

What next?