JavaScript programming - resource notes

I’ve been working on a small project using JavaScript, and thought it would be worth recording some of the useful resources I’ve found:

One of the things I’ve been using JavaScript for is client-side RDF handling. For RDF parsing and basic query, I’ve been using Jim Ley’s JavaScript RDF parser. It’s pretty basic, but functional. Found one bug with namespace handling, which I’ve emailed to Jim. The triples are not indexed in any way, so any moderate querying of the RDF model will get pretty inefficient pretty quickly. However, a handy trick is to author compact RDF, then use the Jena tools, if necessary with custom rules, to generate the deductive closure of the base model, then save that as a file. This makes explicit many of the relations that otherwise would require query to traverse. Some caution needs to be used, since making the source model too big would also be counter-productive for efficiency. Incidentally, a useful side-effect of doing this is that saving the model in RDF/XML format, not RDF/XML-ABBREV, means that rdf:parseType="Collection" is re-written in first/rest/nil format … which is handy since Jim’s parser doesn’t handle parseType Collection.

 newer · index · older