-
Notifications
You must be signed in to change notification settings - Fork 7
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
Refactor model to rdf-js spec #14
Comments
Hi @pietercolpaert! We are also try to establish a stable low level RDF "specification" to enable interoperability between all existing (and future) PHP RDF frameworks, therefore a proposal for the PHP Framework Interoperability Group. Our current working draft can be found here. As i can see, we already use the same terms (blank node, named node,...) as in the specification. What you think of working here together? We are open for input and can discuss changes in our proposal. It would be very cool, if hardf could support it too. |
Hi @k00ni! Thanks for reaching out and yes, I would be interested in making sure all PHP RDF frameworks use the same php-fig standard. If someone starts a pull request to comply to the php-fig standard, I would merge it after testing whether there are no regressions in performance. Regarding the standard itself: are you considering to copy the work by the RDF-js W3C community group? I think that would be a great start in each case! |
Hi, if i understand the spec of the RDF-js W3C community group right, it uses a very "public"-like approach. Properties of classes like I try to outline all differences between our spec and the one of the RDF-js W3C community group. Maybe we can work together to find some common ground. Differences
Node (equals to We don't allow a
NamedNode Bold methods are unique to this class, the rest comes from the Node.
BlankNode Bold methods are unique to this class, the rest comes from the Node.
NamedNode Bold methods are unique to this class, the rest comes from the Node.
Statement (equals to Bold methods are unique to this class, the rest comes from the Node.
ConclusionI guess, class internals like property naming aren't important to discuss here. To "match" our proposal, you only have to add a couple of methods. Most of the names are already equal, so there is not much work either.
We experienced a performance boost using array-only structures instead of class-based. So i guess providing data using all these classes may lead to a "worse" performance. Therefore, i propose, that hardf should keep its current internal model, but provide a way to transform or export its data based on the specification we discuss here. Using specific methods like What you think? |
Great idea! Will merge if pull requested! Cannot allocate time for this myself on short notice though. |
Nice to hear. Ok, let me see what i can do here. |
I just wanted to let you know about my public proposal at Google Groups: https://groups.google.com/forum/#!topic/php-fig/Z1dds-mBRrE You are welcome to post feedback there or via Github. After the proposal is accepted, i would help creating a pull request to add support to hardf. |
The N3.js library has now switched to the RDF.js specification. The urgency to update this library grows as well. |
What does that mean exactly? |
That from the moment I do some PHP work again I should look into refactoring to the RDFPHP spec you’ve built ;-) Or maybe someone wants to do a pull request |
If i understand you correctly, you will implement the RDF specification referenced by me (ref)? If that's the case, be aware that this change may "bloat" the software, because you will have to handle way more objects than before. Right now, using just arrays, is very clean, lean and effective. Anyway, to get going, you could have a look into our Saft Parser based on hardf: https://github.com/SaftIng/Saft/blob/master/src/Saft/Addition/hardf/Data/ParserHardf.php And there are some tests related to this: https://github.com/SaftIng/Saft/tree/master/src/Saft/Addition/hardf/Test |
Aha! So in the end, it’s better to just close this issue and leave as is? |
I may lack some background information. Could you explain why this change affects hardf?
For performance reasons i would suggest keep using the current data model. But we should provide a way to interchange data. This intermediate format could be the PHP RDF specification i was talking about. At the moment no change is required, because one could use my implementation, for instance. It is based on the PHP RDF specification to 99%. |
Hi @pietercolpaert, what is the status here? |
I will follow your recommendation and not change anything here! I’ll close the issue! |
Hi @pietercolpaert, i dont know if you got a notice, a while ago i started working on an implementation of the RDF.js spec: rdfjs/data-model-spec#130. IMHO its a vital successor of Saft and all the other PHP libraries, with the benefit of being compatible to the whole JS ecosystem. I implemented the basic Term related interfaces/classes, but am busy currently. Maybe you are interested in this? |
See https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md
The text was updated successfully, but these errors were encountered: