SOCOM Tutorial Slides - LDflex

Julian Rojas, Ruben Taelman

ISWC 2019, Auckland, 26 October 2019

SOCOM Tutorial Slides - LDflex

Ghent University – imec – IDLab, Belgium

Tutorial Website: http://bit.ly/iswcquery

LDflex Tutorial

What is LDflex?

Traverse Linked Data as JS objects

            await [https://julianrojas.org/#me].name // "Julián Rojas"
      

Traverse Linked Data as JS objects

          await [https://julianrojas.org/#me].name // "Julián Rojas"
  
          await [https://julianrojas.org/#me].friends.name // ["Ruben Verborgh", "Ruben Taelman", ...]
      

How does it work?

Thanks to JSON-LD contexts and JavaScript Proxies we can treat Linked Data graphs as local objects

The await keyword allows waiting for remote HTTP requests

JSON-LD contexts for semantics

Transparent data access

JavaScript Proxies enable LDflex processors to translate path expressions to SPARQL queries and resolve them through a query engine (e.g. Comunica)

Support for data writing

LDflex allows for writing/updating knowledge graphs that support SPARQL UPDATE operations such as SPARQL endpoints and Solid pods.

For example this expression:

        await [https://julianrojas.solid.org/profile/#me].add('foaf:givenName' , 'Julian');
      

Will be translated to this SPARQL UPDATE query:

        INSERT DATA {
          <https://julianrojas.solid.org/profile/#me> 
            <http://xmlns.com/foaf/0.1/givenName> "Julian".
        }
      

LDFlex is Solid compliant

Through Comunica, LDflex uses the solid-auth-client to ensure that only authorized clients can read/write data from/to Solid pods

Hands-on 1: LDflex playground

Find the play ground at https://solid.github.io/ldflex-playground

Hands-on 2: LDflex on React

Goal: Cover the basics on building React applications that use LDflex to query Knowledge Graphs on the Web.

This tutorial will introduce how to reuse existing React components that use LDflex. It will also introduce how can you create your own components that query Knowledge Graphs on the Web.

No advanced JavaScript or React knowledge required, we start from scratch

Hands-on: requirements

Hands-on 2: getting started

Each step is explained in detail on the GitHub wiki:

https://github.com/julianrojas87/Tutorial-ISWC2019-LDflex-on-React/wiki/Tutorial-Walkthrough