Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rdf [2018/08/20 21:02]
christian [Triple store]
rdf [2020/03/18 09:09] (current)
christian [Experience]
Line 68: Line 68:
 First, I read the nicely written [[https://www.w3.org/TR/2014/REC-rdf-syntax-grammar-20140225/#section-Syntax|introductory chapter]] of the RDF specification. For the examples, I programmed a prototyp ad-hoc to read and write them. That was fun, but many details were not mentioned, so that I used wild guesses for parts of the code. First, I read the nicely written [[https://www.w3.org/TR/2014/REC-rdf-syntax-grammar-20140225/#section-Syntax|introductory chapter]] of the RDF specification. For the examples, I programmed a prototyp ad-hoc to read and write them. That was fun, but many details were not mentioned, so that I used wild guesses for parts of the code.
  
-Then I discovered all the [[https://www.w3.org/TR/rdf11-testcases/|tests for RDF]]. Among them was the official test suite which covers every detail. How cool is that! After importing all tests as SUnit tests into the image, I refactored and refined my implementation with the use of the tests. In the beginning, many - about half - failed or lead to errors. This as fun too, but again, there has been not enough information for a "right" implementation. The tests covered all features but only isolated and didn't give any explanation about what the test is testing; just the expected outcome. Sometimes it was not clear how the features would interact with others. Anyhow, I fiddled with my implementation until all tests were green (about 350).+Then I discovered all the [[https://www.w3.org/TR/rdf11-testcases/|tests for RDF]]. Among them was the official test suite which covers every detail. How cool is that! After importing all tests as SUnit tests into the image, I refactored and refined my implementation with the use of the tests. In the beginning, many - about half - failed or lead to errors. This was fun too, but again, there has been not enough information for a "right" implementation. The tests covered all features but only isolated and didn't give any explanation about what the test is testing; just the expected outcome. Sometimes it was not clear how the features would interact with others. Anyhow, I fiddled with my implementation until all tests were green (about 350).
  
 When an example or feature was not clear, I consulted the [[https://www.w3.org/TR/2014/REC-rdf-syntax-grammar-20140225/#section-Infoset-Grammar|formal grammar]]. The grammar consists of syntax productions which clearly describes the form and interplay of all elements. The chapter is not for reading. But it is invaluable for deciding on the right way to program things. So I decided to implement the productions as shown in the spec. This was a lot of fun. I had the tests - all green - and all functionality had been implemented already. Therefore it was just refactoring of the code into a form close to the productions in the spec. This lead to less and cleaner code. And now I am pretty sure, that the implementation is complete. I think that it will handle any legal RDF/XML. When an example or feature was not clear, I consulted the [[https://www.w3.org/TR/2014/REC-rdf-syntax-grammar-20140225/#section-Infoset-Grammar|formal grammar]]. The grammar consists of syntax productions which clearly describes the form and interplay of all elements. The chapter is not for reading. But it is invaluable for deciding on the right way to program things. So I decided to implement the productions as shown in the spec. This was a lot of fun. I had the tests - all green - and all functionality had been implemented already. Therefore it was just refactoring of the code into a form close to the productions in the spec. This lead to less and cleaner code. And now I am pretty sure, that the implementation is complete. I think that it will handle any legal RDF/XML.
  • rdf.1534791748.txt.gz
  • Last modified: 2018/08/20 21:02
  • by christian