NAPL

This is a protocol that turns JSON / YAML into code, allowing it it to modify its own data. This allows applications that pass data to each other and execute code, without recompilation or rebuilding of the code.

NAPL is only meant to perform actions on its own data. Then an application can read from that data and perform other operations.

Basic Types

Class Type

Update

Update { id: string // optional identifier for the update timestamp: number // The time of the update path: [string|number] // The path of the item to modify value: value|expresssion // Set to value or expression confirmed: number // Only confirmed updates can be applied. }

Demo

https://napl.dobuki.net

Process cycle

  1. CodeParser: Register all types and data-bindings. // => registry / observers / clear updatedPaths
  2. DataUpdateManager: Apply all update logs // => updatedPaths
  3. DataBindingManager: Execute data-bindings // => root data updated
  4. Execute all object code (triggered from observers or loopers) //
  5. Clean up