[Profile picture of Ruben Verborgh]

Ruben Verborgh

Components.js: Semantic Dependency Injection

Ruben Taelman, Joachim Van Herwegen, Miel Vander Sande, and Ruben Verborgh

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 open-source 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.

full text BibTeX other citation formats

To be published in 2022 in Semantic Web Journal.

Keywords:

Read this article online

Cite this article in your work

Cite this article easily using its BibTeX entry:

@article{taelman_swj_2022,
  title = {Components.js: Semantic Dependency Injection},
  author = {Taelman, Ruben and Van Herwegen, Joachim and Vander Sande, Miel and Verborgh, Ruben},
  journal = {Semantic Web Journal},
  year = 2022,
  url = {https://linkedsoftwaredependencies.github.io/Article-System-Components/},
}

Alternatively, pick a reference of your choice below:

IEEE
R. Taelman, J. Van Herwegen, M. Vander Sande, and R. Verborgh, “Components.js: Semantic Dependency Injection,” Semantic Web Journal, 2022. Accepted for publication.
ACM
Ruben Taelman, Joachim Van Herwegen, Miel Vander Sande, and Ruben Verborgh. 2022. Components.js: Semantic Dependency Injection. Semantic Web Journal (2022). Accepted for publication.
LNCS
Taelman, R., Van Herwegen, J., Vander Sande, M., Verborgh, R.: Components.js: Semantic Dependency Injection. Semantic Web Journal. (2022). Accepted for publication.
APA
Taelman, R., Van Herwegen, J., Vander Sande, M., & Verborgh, R. (2022). Components.js: Semantic Dependency Injection. Semantic Web Journal. Accepted for publication.
MLA
Taelman, Ruben, et al. “Components.js: Semantic Dependency Injection.” Semantic Web Journal, 2022. Accepted for publication.

Discuss this article