System Runtime

System Runtime

  • Languages iconRomână
    • ENGLISH
    • Ajutati-ne cu Traducerea
  • SUPPORT
  • GITHUB

›Exemple

Introducere

  • What is System Runtime ?
  • System Runtime architecture
  • What is Design First ?
  • Prezentare generală

Ghiduri

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

Exemple

  • Un elementar ''hello world''
  • Create-a-bundle
  • Install a bundle client-side
  • Instalează un pachet in HTML
  • Instalează un pachet server-side
  • Package a bundle
  • Create a component
  • Crează tipuri noi
  • Crează o relație unu la unu
  • Crează multe relații unu la unu
  • Navighează prin modele
  • 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 Clasă
  • runtime Component
  • metamodel Component
  • logger Component
  • Component db
  • history Component
  • Colecție Document

Despre

  • Cine este în spatele lui System Runtime?
  • License
Translate

Quick Start example

const system = runtime.system('mySystem');
const metamodel = runtime.require('metamodel');

// create the Jedi schema
metamodel.schema( 'Jedi', {
  'firstName': 'property',
  'lastName': 'property',
  'nickname': 'property',
  'father': 'link',
  'shout': 'method'
});

metamodel.create();

// Create some Jedis
const Jedi = runtime.require('Jedi');

new Jedi({
  '_id': 'anakin',
  'firstName': 'Anakin',
  'lastName': 'Skywalker',
  'nickname': 'Darth Vader'
});

new Jedi({
  '_id': 'luke',
  'firstName': 'Luke',
  'lastName': 'Skywalker',
  'father': 'anakin'
});

// add Jedi behaviors
Jedi.on('shout', message => message + '!!');

// code your system's logic
system.on('start', () => {
  const luke = this.require('luke');

  if (luke.father().nickname() === 'Darth Vader') {
    console.log(luke.shout('NOOOOOO'));
  }
});

// run 
system.start();

// bundle the current system
console.log(runtime.bundle());

Version compatibility

Remember that the example works both on server and browser.

← Use System Runtime history apisComponent Clasă →
System Runtime is distributed under Apache License 2.0 - Copyright © 2024 Erwan Carriou