System Designer

System Designer

  • Languages iconSvenska
    • English
    • Ελληνικά
    • Português (Brasil)
    • 繁體中文
    • Help Translate
  • SUPPORT
  • GITHUB

›Guides

Introduction

  • What is System Designer?
  • What is Design First?
  • Quick Start
  • Quick Start in videos

Guides

  • Installation
  • Create a System
  • Create a Schema
  • Edit a model
  • Create a Behavior
  • Create a Type
  • Create a Component
  • Run your System
  • Export a System
  • Import a System
  • Generate a diagram
  • Sync your systems with GitHub
  • Design a remote client system
  • Design a remote server system
  • Hantera tillägg
  • Extend System Designer
  • Shortcuts

Tutorials

  • List of Examples
  • Bundle your CSS
  • Bundle your JavaScript
  • Bundle your HTML
  • Test a server-side application
  • Create a NPM module
  • Create a website
  • Lyssna efter en modellhändelse
  • Listen to a data store event
  • Send messages
  • Send messages to other systems
  • Create an extension
  • Generate a model from a JSON file
  • Create a Graph system

Articles

  • Articles about the project

About

  • Who is behind System Designer?
  • Privacy Policy
  • License
Translate

Create a Schema

A schema helps you to define your model. A schema generates a model based on very simple informations. You can then edit the generated model.

Create a schema

To create a schema in System Designer:

  • click on the Schemas tab,
  • click on the '+' button on the left toolbar,
  • type the name of your schema,
  • then click on Create button,
  • a new schema is now created and appears in the Schema list:

Image Alt

Edit a schema

  • then click on the created schema,
  • an editor will open the content of the schema,
  • you can now edit the configuration of the schema:

Image Alt

  • go back to the Schemas tab and
  • your modifications have been updated.

Image Alt

What is a configuration?

A configuration is an object in which you declare the property / link / collection / method / event of the model.

In the configuration object you have by default these properties:

  • _id : string, unique id of your schema.
  • _name : string, name of your schema.

Define inheritance

To add inheritance between your schemas you need to add the _inherit property. This property is an array in which you put all the schema names that this schema must inherit.

{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "_inherit": ["Person"]
}

In this example Jedi schema inherits from Person.

Define a property

To define a property add a key that has got a property value.

{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "name": "property"
}

In this example Jedi has a name property.

Define a link

To define a link between models, add a key that has got a link value. A link is a 1-1 link between models.

{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "father": "link"
}

In this example Jedi has a father link.

Define a collection

To define a collection add a key that has got a collection value. A collection can be:

  • a collection of typed objects (example: adresse, ...) or
  • a collection of components (i.e. like a 1-N link between models).
{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "children": "collection"
}

In this example Jedi has a children collection.

Define a method

To define a method add a key that has got a method value.

{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "fullName": "method"
}

In this example we have defined a fullName method for Jedi.

Important note on renaming

If you rename an existing method, it will delete the method and create a new one. So any code related to the previous method will be deleted.

Define an event

To define an event add a key that has got an event value. An event is a asynchronous method.

{
  "_id": "ee8b5c97-cb89-4cdf-82b3-d9d8bea23ac5",
  "_name": "Jedi",
  "statusChanged": "event"
}

In this example we have defined a statusChanged event for Jedi.

Want to know more?

For more information on schemas, go to the System Runtime documentation.

← Create a SystemEdit a model →
  • Create a schema
  • Edit a schema
  • What is a configuration?
  • Define inheritance
  • Define a property
  • Define a link
  • Define a collection
  • Define a method
  • Define an event
System Designer is distributed under Apache License 2.0 - Copyright © 2024 Erwan Carriou