rdf-ext-archive / discussions

This repo is for discussions all over the rdf-ext project
3 stars 2 forks source link

N00bs questions #16

Closed bergos closed 8 years ago

bergos commented 8 years ago

From @betehess on January 25, 2015 23:32

Sorry, this is not exactly an issue but I didn't know where to ask those questions.

First, just know that I am mostly a n00b with Javascript. More exactly, that I don't have any experience with Node.js, nor with JS libraries relying on some Node.js toolchain.

First, I am not sure where to find the main rdf-ext.js library. I guess it's not that one? Do I need to build the library myself? How?

I have the same questions with the dependencies. For example, the README mentions N3.js. But I don't see it anywhere under lib. Do I need to pull manually that dependency? How do I know about which version is supported? What about the other files under lib?

About the documentation: I have seen http://bergos.github.io/rdf-ext-spec/ and I think I can read WebIDL. But in the example you added today, you used parseTurtle, which I don't find in the main specification. I guess it's somewhat related to DataParser? In any case, I am mostly interested in RDF parsers that can eagerly react on triples instead of the complete graph if that's available (we have our own Graph implementation in banana-rdf). Maybe it's the ProcessorCallback thing? I couldn't find its definition in the spec.

At this point, I would appreciate a few notes on how to get started with rdf-ext in the browser, with the examples you just added, and starting from a blank project. Thanks again for everything: I really want to use rdf-ext from banana-rdf :-) To get an idea of what I am doing, you can look at https://github.com/w3c/banana-rdf/pull/219 .

Copied from original issue: rdf-ext/rdf-ext#16

bergos commented 8 years ago

@betehess Thanks for your issue. Feedback is always very welcome to know where to extend the documentations, simplify stuff in the code etc.

The browser version is built using the build.js program. You can run it using node 'node build.js' or with the npm install script 'npm install'. That should build a rdf-ext.js in the dist folder.

At the moment only the package.json file describes the node dependencies. In the browser it's a little bit different. But the usage section covers already what to import. At the moment you need to download the dependencies manually. Usually the latest version of the dependencies should work. In the future I want to use bower. There is already an issue for this task.

RDF-Ext is an extension to http://www.w3.org/TR/rdf-interfaces/. Section 4.1 describes why there is a parseTurtle method.

So you also want to process only fragments of the serialized graph? Like it's possible with N3.js? That could be possible with ProcessCallback, but the other parsers don't support this feature (RDF/XML, JSON-LD). So I suggest at the moment that you use N3.js directly if you need that feature. The ProcessorCallback can be used at the moment, but it's like parsing and calling graph.forEach().

It would be cool if you could integrate RDF-Ext into banana-rdf. I will integrate you feedback into the next version of the README. Also an example folder seems to be a good idea.