Skip to content

Commit

Permalink
Restructure configs section
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Aug 3, 2021
1 parent afda38c commit 7249c9b
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions content/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ and can usually be automatically generated.
The second level is the creation of *configuration* files,
which represent the actual instantiation of components
based on the generated components files.
Hereafter, we explain these two levels in more detail.

### Components files

Component files are used to semantically represent the constructors of software components.
For this, we make use of two vocabularies, which will be explained hereafter.
In this section, we discuss the two main vocabularies that are used within these component files,
and show how configuration files can refer to them for instantiation.
Next, we explain how URLs can be minted for software components, so that they become fully dereferenceable.
Finally, we explain how these component files can be generated automatically from existing TypeScript code.

#### Object-Oriented Components Vocabulary
### Object-Oriented Components Vocabulary

Components.js distinguishes between three main concepts:

Expand Down Expand Up @@ -78,7 +75,7 @@ Instantiation of `ex:MyModule/MyComponent` using a value for the parameter `ex:M
</figcaption>
</figure>

#### Object Mapping Vocabulary
### Object Mapping Vocabulary

As shown in the previous section, the OO vocabulary allows modules, components, and parameters to be defined,
so that instances of components can be declared.
Expand Down Expand Up @@ -125,7 +122,7 @@ which means that our component from [](#module-om) can still be instantiated in
The only difference now, is that we are able to determine how exactly the parameter values are to be used for invoking the component constructor.
For example, the instantiation of [](#instance-oo) corresponds to the following code in JavaScript: `new MyComponent({ name: 'Some name' })`

#### Dereferenceability
### Dereferenceability

In [previous work](cite:citesAsAuthority van2017describing)
we introduced the [Linked Software Dependencies (LSD) service](https://linkedsoftwaredependencies.org/){:.mandatory},
Expand All @@ -148,7 +145,7 @@ This LSD service allows creators of components files to mint LSD-based URLs for
which will automatically become dereferenceable as soon as these packages are published to npm.
The LSD service thereby removes the dereferenceability responsibility from package developers that want to use dependency injection via Components.js.

#### Generation from TypeScript
### Generation from TypeScript

For larger projects, the manual creation of components files for all classes in the project can require significant manual effort, and can therefore become error-prone.
For projects that make use of a strongly-typed language, such as TypeScript,
Expand Down Expand Up @@ -178,8 +175,3 @@ TypeScript class that is used as input to Components-Generator.js.
Components file that is generated by Components-Generator.js from the TypeScript file from [](#generator-ts).
</figcaption>
</figure>

### Configuration files

Write me; do we even need much here?
{:.todo}

0 comments on commit 7249c9b

Please sign in to comment.