Concepts

April 17, 2019 ยท View on GitHub

This project is rather generic and conceptual, so we define specific words in order to avoid any confusion between similar concepts.

Also we try to enforce using the same words between the code base, the API and the documentation.

Users

User of this library, i.e. maintaining the server-side

Clients

Users of a server maintainer, i.e. using the client-side

Middleware

Requests/responses are passed through a series of functions called middleware.

Layer

Group of middleware.

Protocol

Network protocol, e.g. HTTP.

Method

Protocol method, e.g. GET or POST.

GraphQL method

query or mutation. The first is for find CRUD command, the second for all others.

JSON-RPC method

JSON-RPC method field, indicating the current command, e.g. find_users.

Payload

Request payload

Headers

Protocol headers

Status

Response's status, e.g. SUCCESS or SERVER_ERROR

Format

File format, e.g. YAML or JSON, used in configuration files, client request payloads and server responses.

Charset

Character set, e.g. utf-8 or ascii.

RPC system

Main semantics of the request, e.g. GraphQL, REST or JSON-RPC.

Arguments

Options passed to a request

Also used to designate function arguments.

Parameters

Arguments passed to configuration functions.

Variables

Variable, from a programming point of view.

Also used for query variables, path variables, GraphQL variables and environment variables.

Action

A sets a commands, tied to a specific command type.

E.g. in GraphQL, find_users(...) { ... }

Command

Actual database query, from a server perspective. An action is converted to one or several commands. E.g. a patch command will first trigger a find command to query the current models to patch.

Functions

Functions specified in configuration, that allows injecting custom logic.

Utilities

Set of generic code under src/utils/

Request

Client request, e.g. HTTP request

Response

Response of the request, i.e. what the client receives

Result

Database query result. Each request usually assemble several results into a single response.

Response type

Abstracted content type, e.g. collection.

Error

Thrown exception

Error response

Response containing error information

Error reason

Generic error type

Collection

Like a database table or collection

Model

Individual object inside a collection

Nested collection

Attribute inside a collection targeting another collection

Target collection

Collection targeted by a nested collection

Attribute

A collection's attribute, i.e. like a database column or key

Property

Any object property

Instruction

Top-level instruction, e.g. run.