Abstract
Many RDF devtools exist for JavaScript that let developers read and modify RDF data, but they often opt to use proprietary interfaces and don’t fully leverage the methods of reading and writing data with which JavaScript developers are familiar. This paper introduces Linked Data Objects (LDO), a JavaScript-based devtool designed to make reading and writing RDF as similar to programming traditional TypeScript applications as possible. LDO generates TypeScript typings and a JSON-LD context from an RDF Shape like ShEx. A JavaScript Proxy uses the generated code to serve as an abstracted interface for an underlying RDF/JS dataset, allowing the developer to manipulate RDF as a TypeScript object literal. LDO is currently in use in a small number of RDF-based projects and our user studies indicate that LDO’s interface-parity with TypeScript object literals is preferable to proprietary interfaces in other JavaScript RDF devtools. Finally, this paper proposes future work to make LDO even more approachable for JavaScript developers.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
RDFJS. https://rdf.js.org/. Accessed 12 July 2022
ClownFace Documentation. https://zazuko.github.io/clownface/#/. Accessed 12 July 2022
Tripledoc Documentation. https://vincenttunru.gitlab.io/tripledoc/. Accessed 12 July 2022
rdflib source code. https://github.com/linkeddata/rdflib.js/. Accessed 12 July 2022
JSON-LD. https://json-ld.org/. Accessed 12 July 2022
Verborgh, R., Taelman, R.: LDflex: a read/write linked data abstraction for front-end web developers. In: Pan, J.Z., et al. (eds.) ISWC 2020. LNCS, vol. 12507, pp. 193–211. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-62466-8_13
RDF Object source code. https://github.com/rubensworks/rdf-object.js#readme. Accessed 12 July 2022
SimpleRDF source code. https://github.com/simplerdf/simplerdf. Accessed 12 July 2022
RDF Tools source ode. https://github.com/knowledge-express/rdf-tools#readme. Accessed 12 July 2022
Shex Methods documentation. https://ludwigschubi.github.io/shex-methods/. Accessed 12 July 2022
Semantika source code. https://github.com/dharmax/semantika#readme. Accessed 1 July 2022
ts-rdf-mapper source code. https://github.com/artonio/ts-rdf-mapper. Accessed 12 July 2022
Fischer, L., Hanenberg, S.: An empirical investigation of the effects of type systems and code completion on API usability using TypeScript and JavaScript in MS visual studio. In: SIGPLAN 2015, vol. 51, pp. 154–167. ACM Digital Library (2016)
Endrikat, S., Hanenberg, S., Robbes, R., Stefik, A.: How do API documentation and static typing affect API usability? In: Proceedings of the 36th International Conference on Software Engineering (ICSE 2014), pp. 632–642. Association for Computing Machinery (2014)
ShEx – Shape Expressions. http://shex.io/. Accessed 02 May 2023
Shape Constraint Language (SHACL). https://www.w3.org/TR/shacl/. Accessed 02 May 2023
Rdfjs/N3.js. https://github.com/rdfjs/N3.js/. Accessed 02 May 2023
JSON-LD Streaming Parser. https://github.com/rubensworks/jsonld-streaming-parser.js. Accessed 02 May 2023/
RDF/JS: Dataset specification 1.0. https://rdf.js.org/dataset-spec/. Accessed 02 May 2023
Who says using RDF is hard? https://www.rubensworks.net/blog/2019/10/06/using-rdf-in-javascript/. Accessed 02 May 2023
Keet, C.M.: Open world assumption. In: Dubitzky, W., Wolkenhauer, O., Cho, K.H., Yokota, H. (eds.) Encyclopedia of Systems Biology, p. 1567. Springer, New York (2013). https://doi.org/10.1007/978-1-4419-9863-7_734
Graversen, K.B.: Method Chaining. https://web.archive.org/web/20110222112016/http://firstclassthoughts.co.uk/java/method_chaining.html. Accessed 02 May 2023
EMCAScript 2024 Language Specification. https://tc39.es/ecma262/multipage/reflection.html#sec-proxy-objects. Accessed 02 May 2023
JSON Schema. https://json-schema.org/. Accessed 02 May 2023
Morgan, J.: LDO source code. Zenodo (2023). https://doi.org/10.5281/zenodo.7909200
So(m)mer. https://github.com/bblfish/sommer. Accessed 15 July 2023
jenabean. https://code.google.com/archive/p/jenabean/. Accessed 15 July 2023
Owl2Java. https://github.com/piscisaureus/owl2java. Accessed 15 July 2023
JSON-LD Schema. https://github.com/mulesoft-labs/json-ld-schema. Accessed 15 July 2023
Solid. https://solidproject.org/. Accessed 15 July 2023
Acknowledgements
This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission’s Next Generation Internet program, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101069594.
Resource Availability Statement: Source code for LDO and its dependencies: ldo (https://purl. archive.org/o.team/ldo), ldo-cli (https://purl.archive.org/o.team/ldo-cli), shexj2 typeandcontext (https://purl.archive.org/o.team/shexj2typeandcontext), jsonld-dataset-proxy (https://purl.archive.org/o.team/jsonld-dataset-proxy), o-dataset-pack (https://purl.archive.org/o.team/o-dataset-pack).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Morgan, J. (2023). Linked Data Objects (LDO): A TypeScript-Enabled RDF Devtool. In: Payne, T.R., et al. The Semantic Web – ISWC 2023. ISWC 2023. Lecture Notes in Computer Science, vol 14266. Springer, Cham. https://doi.org/10.1007/978-3-031-47243-5_13
Download citation
DOI: https://doi.org/10.1007/978-3-031-47243-5_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-47242-8
Online ISBN: 978-3-031-47243-5
eBook Packages: Computer ScienceComputer Science (R0)