-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting the RDF.JS interface #1
Comments
The following guideline contained in the specs To preserve access to the native interface, we could make the rdf interface available via some method such as @elf-pavlik we welcome all thoughts and suggestions you might have on this. |
@RubenVerborgh just mentioned on https://gitter.im/rdfjs/Representation-Task-Force?at=58c011fa1465c46a5602aaa1 switching from very minimalistic plain object N3.js used to those interface had minimal performance impact. I believe he can offer much more feedback on that and possibly soon report his experience in more detail on rdfjs/data-model-spec#67 |
@jacoscaz There is no performance penalty associated with "transforming plain objects to class instances": plain objects are also class instances (Object), and all modern JavaScript engines are specifically tailored to excel on objects with the same shape (i.e., all property accesses will be translated to machine code). The small performance penalty that I took with N3.js, as mentioned by @elf-pavlik, is because N3.js used single-level objects. On the other hand, the "Given the necessity of methods, plain objects (JSON) cannot be used." is misleading in the RDF/JS spec, as these methods are not required for core data tasks (subject/predicate/object/graph) but rather for equality and conversion. |
Thanks to @elf-pavlik and @RubenVerborgh for the excellent brainstorming on Gitter. Strategy:
|
Closing this. Will track bugs and enhancements in dedicated issues. |
As suggested by @elf-pavlik in levelgraph/levelgraph#43 (comment) .
See specs: https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md
Status:
.import()
).match()
without regexp support).remove()
,.removeMatches()
,.deleteGraph()
)The text was updated successfully, but these errors were encountered: