Code Monkey home page Code Monkey logo

fdr's Introduction

FDR is a TypeScript library for building applications backed by an RDF model and the Semantic Web Technology Stack in general (SPARQL, triplestores, OWL ontologies, inferencing etc.).

FDR makes use of the RDFJS APIs, but considers them as a low level foundational layer.

The goals of FDR as a framework and a toolkit are:

  • Provide a set of abstractions that makes programming with models and data represented in RDF easy and fun.
  • Provide facilities for state management that include UI state, caching and synchronization with backend (typically SPARQL endpoints).
  • Make it possible to extend with one's one abstractions for front-end or backend integration with non-standard APIs (i.e. APIs that don't follow the SPARQL HTTP protocol)

NPM Package: https://www.npmjs.com/package/@kobrix/fdr

Tutorial: https://kobrixinc.github.io/fdr-tutorial/ (app repo https://github.com/kobrixinc/fdr-tutorial)

API Docs: https://kobrixinc.github.io/fdr/api/index.html

Programmer's Guide: https://kobrixinc.github.io/fdr/

Quick Start

To install:

npm install @kobrix/fdr

Connecting to a triplestore with a local cache and reading some data:

import { SPARQLProtocolClient, fdr } from '@kobrix/fdr'

// Setup some prefixes to use globally when providing IRIs for properties and entities.
fdr.resolver.prefixResolver.withPrefixes({
  "dbr": "http://dbpedia.org/resource/",
  "dbp": "http://dbpedia.org/property/"
})

// Default client implementation for a stnadard SPARQL endpoint. 
let dbpedia = new SPARQLProtocolClient("https://dbpedia.org/sparql", "https://dbpedia.org/sparql/statements")

// Obtain a local cache bound to a given endpoint (could be a custom REST API 
// so long as an implementation for it is provided)
let graph = fdr.graph({ store: dbpedia })

// Create an entity "proxy", something that refers to an entity in the graph,
// without necessarily fetching its properties.
let newyork = graph.factory.subject(fdr.subjectId("dbr:New_York_City"))

// Declare that we will actually need the properties of that entity - an async backend call.
await graph.use(newyork)

// Hee is the current populate of Manhattan according to DBPedia.
console.log('NewYork', newyork.get("dbp:populationTotal"))

For more, follow the tutorial.

Community

To get support, file an issue or post to the Github discussions:

https://github.com/kobrixinc/fdr/discussions

To contribute, file a pull request. If you are looking for ideas what a useful PR could be, post to the discussions.

fdr's People

Contributors

bolerio avatar bruzoopak avatar

Stargazers

Justin Lewis avatar Lukas Welsch avatar Bob Coret avatar  avatar Tim Thompson avatar Patrick Park avatar -- avatar Rouzbeh avatar Alfredo Serafini avatar Tane Piper avatar  avatar

Watchers

 avatar

Forkers

greydoubt

fdr's Issues

Property removal and replacement without knowing current values

At the moment QuadRemoved requires you to provide the values of all 4 components of the quad. And consequently removing a property requires you to know the value of the existing property.

From the perspective of a user who wants to delete the value of a property, whatever it is, it doesn't make much sense to first read it.

These change management classes have the double function at the moment to capture changes, as they occurred so they can be applied elsewhere, and reversed. However, as a pure replace or remove operation they are not very user friendly.

Either "unknowns" should be allowed in these change objects or there should be a separate API to allow for "remove property whatever it is type of operation". Either way, this means we need to couple a remove/replace operation with some way to track the actual changes or chose to ignore them.

RDF/EXT?

Look into whether it makes sense to use and possibly expose the RDF-EXT library: https://github.com/rdf-ext/rdf-ext. It seems lightweight enough and with some helpful extensions to the RDFJS minimalistic and hard to use stuff.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.