Skip to content

zenturi/zenflo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0ff47c0 · May 4, 2023

History

44 Commits
May 4, 2023
Feb 26, 2022
Feb 14, 2022
Feb 26, 2022
Feb 26, 2022
Nov 12, 2021
Nov 13, 2021
Nov 14, 2021
Feb 26, 2022
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Feb 26, 2022
Feb 26, 2022
Feb 9, 2022
Jan 18, 2022
Jan 18, 2022
Feb 26, 2022
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Nov 12, 2021
Feb 26, 2022
Feb 26, 2022
Feb 26, 2022
Feb 20, 2022
Feb 26, 2022
Feb 26, 2022

Repository files navigation

ZenFlo

Flow Based Programming Kit.

ZenFlo is an implementation of flow-based programming for Haxe running on and expected to run on all Haxe targets. It is a port of the NoFlo library.

Scope

ZenFlo is a way to coordinate and reorganize data flow in any application. If you are building no-code/low-code programs or editors, ZenFlo handles that. Each node is a black-box or small unit of your program, and ZenFlo helps you connect these nodes in such a way that they are portable and reusable.

Dependencies

This project uses lix.pm as Haxe package manager. Run npm install to install the dependencies.

Run Tests

npx run haxe test.hxml

Usage

Read the NoFlo Documentation on how components are loaded.

To convert an Haxe function into a ZenFlo component:

import zenflo.lib.loader.ManifestLoader;
import zenflo.lib.Macros.asComponent;
import zenflo.lib.Macros.asCallback;
import zenflo.lib.Utils.deflate;

ManifestLoader.init();
final loader = new ComponentLoader(Sys.getCwd()));
final component = (_) -> asComponent(deflate(Math.random), {});
loader.registerComponent('math', 'random', component, (e) -> done());

loader.load('math.random').handle(cb -> {
    switch cb {
        case Success(_): {
            final wrapped = asCallback('math.random', {loader: loader});
            wrapped('bang', (err, res) -> {
                if (err != null) return;
                trace(Std.isOfType(res, Float)); // True
            });
        }
        case Failure(err):{
            // throw error
        }
    }
});

See the Component Spec for more examples of how components send data to eachother.

Releases

No releases published

Packages

No packages published

Languages