System Runtime

System Runtime

  • Languages iconENGLISH
    • Română
    • Help Translate
  • SUPPORT
  • GITHUB

›Introduction

Introduction

  • What is System Runtime ?
  • System Runtime architecture
  • What is Design First ?
  • Overview

Guides

  • Quick Start
  • How to install System Runtime
  • Design your model
  • Create components
  • Manage your components
  • Bundle your system
  • Extend System Runtime
  • Go deeper

Examples

  • A basic "hello world"
  • Create a bundle
  • Install a bundle client-side
  • Install a bundle in HTML
  • Install a bundle server-side
  • Package a bundle
  • Create a component
  • Create new types
  • Create a one to one relationship
  • Create a one to many relationship
  • Navigate through the model
  • Inheritance between components
  • Listen to a change of state of a component
  • Use System Runtime NoSQL Database
  • Object-Document Mapper in action
  • Use System Runtime core apis
  • Use System Runtime history apis
  • Quick Start example

APIS

  • Component Class
  • runtime Component
  • metamodel Component
  • logger Component
  • db Component
  • history Component
  • Document Collection

About

  • Who is behind System Runtime ?
  • License

What is System Runtime ?

When you code, you do not create an application, you create in fact a system. System Runtime give you the APIs to create the model, components and behaviors of your system.

What is a system ?

A system:

  • is defined by a model,
  • is composed by components and
  • reacts to events with actions that we call behaviors..

Image Alt

Create a system

Use System Runtime APIs to create your system:

// create a system
const system = runtime.system('mysystem');

// add code in the start method
system.on('start', () => console.log('Hello world !'));

// start the app
system.start();

Now you can bundle your system into a JSON object:

// create a bundle
runtime.bundle();

It will return this JSON:

{
  "_id": "154cd18d0210516",
  "name": "system",
  "description": "",
  "version": "0.0.1",
  "schemas": {},
  "models": {},
  "types": {},
  "behaviors": {
    "1ea9c1d5f811ae1": {
      "_id": "1ea9c1d5f811ae1",
      "component": "154cd18d0210516",
      "state": "start",
      "action": "() => console.log('Hello world !')",
      "useCoreAPI": false,
      "core": false
    }
  },
  "components": {}
}

Install the bundle in HTML

Just add a link tag in your HTML to install and start your bundle:

<!-- import your JSON -->
<link rel="system" type="application/json" href="system.json">

<!-- load System Runtime -->
<script src="https://cdn.jsdelivr.net/npm/system-runtime/dist/system-runtime.min.js"></script>

Install the bundle in Node.js

Just call install and start methods to execute your bundle:

// require System Runtime
const runtime = require('system-runtime');

// install and start your system
runtime.install('system.json');
System Runtime architecture →
  • What is a system ?
  • Create a system
  • Install the bundle in HTML
  • Install the bundle in Node.js
System Runtime is distributed under Apache License 2.0 - Copyright © 2024 Erwan Carriou