Skip to content
Robert de Forest edited this page Jan 28, 2019 · 1 revision

Description

An Engine is an application which

  • Provides Object hosting services required by a Core
  • Persistence
  • Referent/Relation modeling
  • Dynamic function loading

Aspects

Persistence

  • Referent
    • Has only its own ID. Everything about it comes from the other three classes:
  • referent property
    • Associates arbitrary static data with a Referent.
  • Relation
    • Relates a subject to an object via a relationship (all three are Referents)
  • Behavior
    • Associates programming with a referent

Refrent/Relation Model

Behavior

Programming Interface

engine = new Engine ...
$root = engine.root
$sys = engine.sys
assert $sys.parent is $root
SEND = engine.send

SEND $root, 'spawn'
  .then (child) ->
    assert child.parent is $root
    assert child in $root.children

$root.addProperty 'name', 'root'
$root.addMethod 'set_root_name', CoffeeScript.compile, """
    (newName) ->
      name = newName
  """

Clone this wiki locally