Online / 5 & 6 February 2022

visit

Behavior Graph

A proven architecture for complex applications


Behavior Graph is a software architecture and state management library. It greatly enhances your ability to write complex user facing software and control systems.

Broadly speaking, it belongs to the category of libraries which includes Redux, MobX, Rx (Reactive Extensions), and XState.

It works by providing a new unit of composition which we call the behavior. Behaviors are simple blocks of code together with their dependency relationships.

We developed Behavior Graph to address our own complexity challenges while building an iOS video playing library which is used internally throughout the suite of native Yahoo mobile apps. After years of development and production usage, it has proven to be incredibly competent at scale.

We have since ported it to multiple languages including Javascript/Typescript. It is less than 1500 lines of code and contains no external dependencies.

Behavior Graph should appeal to anyone with an interest in software architectures and willingness to rethink how we write software applications.

Behavior Graph makes the dependency relationships between blocks of code its primary responsibility. We believe these relationships are the main source of complexity in most applications. Behavior Graph asks programmers to explicitly declare these dependency relationships. In exchange, it ensures that blocks of code are run at the correct time and in the correct order. As a result, the programmer is freed to reason locally about contained units of functionality, while the computer takes on the increasing complexity burden as an application grows in size.

In the presentation we will introduce the primary abstractions provided by Behavior Graph. We will do this by working through a simple example of how the library works with code samples. Then we will show how these pieces hold together as an architecture.

We will briefly touch on how it compares to similarly positioned libraries. Finally we will look at the current state of the library and a roadmap for the future.

Speakers

Photo of Sean Levin Sean Levin

Links