-
Notifications
You must be signed in to change notification settings - Fork 13
_Prtcl dev guide 3: Cortex modules
A Cortex module is the basic unit of MicroModule that we are gonna use as the building blocks of our applications.
Each module represents a slice of vertical functionality, built form these parts:
- Patterns: basic unit of logic of any Cortex module. They determine how a certain kind of object can behave (has links, redirects, can be cloned...)
- Lenses: native HTML elements that know how to render and interpret the module's patterns.
- Service providers: service classes that allow the module's patterns, lenses and other parts of Cortex to interact with the backends where the data is stored.
For example, tasks
module would include:
- Patterns:
-
TaskPattern
: implements the differents pattern that ourTask
entity follows. -
DependencyPattern
: implements generic dependency linking for any two content addressable objects.
-
- Lenses:
-
TaskDetail
: renders the task and its details. -
TaskDependencyGraph
: renders the task and all its dependencies as a visual graph.
-
- Service providers:
-
TaskProvider
: service with a genericget(hash: string): Task
function and some other functionality:createTask
orassignTask
, for example. -
DependenciesProvider
: service that offers getters and setters of generic linking between content-addressable objects.
-
In this first part of the guide, we are going to learn how to use the documentsModule together with the eveesModule, to build a simple document editor with version control built-in.
Let's begin by configuring our backend services at 4 - Configuring service providers.
_Prtcl resources: Overview, Spec, Dev guide, API reference
4 - Configuring service providers
6 - Loading modules with micro-orchestrator
[TBD]10 - adding lens selection
[TBD] Using Cortex without modules
[TBD] Building a pattern
[TBD] Building a lens
[TBD] Building a service provider
[TBD] Building a Cortex module
[TBD] Customizing the lenses module
[TBD] Building a plugin for the lenses module