solid/solid-namespace

Use rdflib.js and export NamedNodes

Closed this issue · 4 comments

Looks like rdflib.js has become the primary way of interacting with LD and writing solid apps. This repo should probably integrate more directly with rdflib.

I'm thinking this should function essentially the same as solid-ui's ns.js. Planning on putting in a PR, but figured it's worth a Issue to hold any discussion that may be had.

@timbl mentioned in chat that this library may be intended to export the string values rather than the rdflib NamedNodes.

I'm quite new in the Solid App Dev world, so my question is: what is the primary use of the namespaces? Just from walking through the guide and some docs it seems like that would be the NamedNodes from $rdf.Namespace(). If so, it'd be great if this library exports those, just to remove another step from the majority of use cases. Also, it seems you can get the string from the NamedNode (with .uri I think)

Hi @JordanShurmer,

Thanks for creating this issue; here are my two cents.

Looks like rdflib.js has become the primary way of interacting with LD and writing solid apps.

Not necessarily; we are still figuring this out.

This repo should probably integrate more directly with rdflib.

I think there is a benefit to having just a set of generic namespaces, not tied to a library.

This library exports a function, and to that function you can pass any RDF/JS-compatible library of your choice, including RDFlib.js.

Okay, I think that makes sense..
I'll rework the PR to function more like the current version, which does exactly that 😄

Closing this Issue PR #3 addresses what became the intention of this.

The result that we ended up with is that, same as the existing version, you pass in an rdflib if you want to. if you do the rdflib.namedNode is used when asking for a term, otherwise just the uri for the term is used.