OpenSCD-Core addons alternatives

Context

The current setup with mixins leads to:

  • Mixins are extentions on the code (code depends on OpenSCD classes)
  • New mixins are hard to merge back into OpenSCD-Core
  • Change of many OpenSCD-Core variants (all with different mixins)


Decision

We will use OpenSCD-Core addons in order extend the OpenSCD-Core functionality. OpenSCD addons are added to extend core functionality. It allows to experiment (without commit it directly to the core) and add functionality for just a small group of users. Once an addon is used a lot and is considered stable, it can become a part of the core functionality.


Considered alternatives

Keep using Mixins as done in OpenSCD monolith architecture.


Pro's:

  • Already known

Con's:

  • Mixins are extentions on the code (code depends on OpenSCD classes)
  • New mixins are hard to merge back into OpenSCD-Core
  • Change of many OpenSCD-core variants (all with different mixins)



Build a permanent solution directly in OpenSCD-Core

In the alternative, the idea is to add all the functionality directly into OpenSCD-Core.


Pro's

  • Easy to use: one single repository with all the needed functionality

Con's

  • No room for experimentation
  • Limited flexibility (these are the only 

Consequences

Pro's:

Flexibility

Room for experimentation


Con's:

Risk of having 2 similar addons with similar functionality

Keep track of all the addons