arrow
Return

Components.js: Semantic dependency injection

delete2022-11-30
delete1
delete
OA
AI
R
Ruben Taelman *
J
Joachim Van Herwegen
M
Miel Vander Sande
R
Ruben Verborgh
DOI:10.3233/SW-222945delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
A common practice within object-oriented software is using composition to realize complex object behavior in a reusable way. Such compositions can be managed by Dependency Injection (DI), a popular technique in which components only depend on minimal interfaces and have their concrete dependencies passed into them. Instead of requiring program code, this separation enables describing the desired instantiations in declarative configuration files, such that objects can be wired together automatically at runtime. Configurations for existing DI frameworks typically only have local semantics, which limits their usage in other contexts. Yet some cases require configurations outside of their local scope, such as for the reproducibility of experiments, static program analysis, and semantic workflows. As such, there is a need for globally interoperable, addressable, and discoverable configurations, which can be achieved by leveraging Linked Data. We created Components.js as an opensource semantic DI framework for TypeScript and JavaScript applications, providing global semantics via Linked Data-based configuration files. In this article, we report on the Components.js framework by explaining its architecture and configuration, and discuss its impact by mentioning where and how applications use it. We show that Components.js is a stable framework that has seen significant uptake during the last couple of years. We recommend it for software projects that require high flexibility, configuration without code changes, sharing configurations with others, or applying these configurations in other contexts such as experimentation or static program analysis. We anticipate that Components.js will continue driving concrete research and development projects that require high degrees of customization to facilitate experimentation and testing, including the Comunica query engine and the Community Solid Server for decentralized data publication.
Keywords:
Dependency injection
inversion of control
RDF
linked data

Journal

Semantic Web cover
Semantic Web
IF:
2.9
Papers:
603
Citations:
1.6K

Organization

G
Ghent University
Scholars:
5.2W
Papers: 4.5W
Citations: 5.5W
I
interuniversity microelectronics centre
Scholars:
6.3K
Papers: 3.9K
Citations: 0