Closed dchandekstark closed 9 years ago
:+1: Yes, a unique namespace seems like a great idea. We should also bring @gkellogg into this eventually and ask where he thinks these vocabs should live.
There are other RDF gems that include their own vocabulary classes as well. The reason for those in RDF.rb is mostly historical, and could be moved to an rdf-vocab gem, but that would be a breaking change. To keep it from breaking existing uses, we'd likely need to require rdf-vocab from RDF.rb. I'd certainly be willing to entertain that.
A middle ground might be to leave core vocabularies such as RDF, RDFS and maybe DC, FOAF or OWL and move the rest into this gem.
@bendiken started this pattern, and should also have an opinion. It has gotten to be a bit heavyweight at this point.
To the original question, putting vocabularies in the RDF namespace should be fine, as long as they don't conflict. Changing things to depend on this gem for more vocabularies and make it core to other ruby-rdf gems would require a licensing change, IMO. Everything else is UNLICENCE'd. In any case, you should consider that licencing model and consider transferring the gem to the ruby-rdf account if this is to hold more generic vocabularies.
The consistent pattern with RDF.rb plugin gems has been that a gem name of rdf-foobar
implies a module name of RDF::Foobar
. So, according to the principle of least surprise, the module name ought to be RDF::Vocab
, and a user would then just do include RDF::Vocab
to bring all the provided vocabularies into scope.
Further, as @gkellogg mentioned above, we couldn't entertain the notion of bringing this project into the RDF.rb fold, so to speak, under the current copyrighted licensing conditions. Everything under the ruby-rdf project is free and unencumbered public domain software, ensuring that code can be freely copied/moved between the various subprojects.
Thanks to @gkellogg and @bendiken for the helpful background and guidance. See #20 for the question of bringing rdf-vocab into ruby-rdf. That issue aside, it sounds now like RDF::Vocab
is the logical choice?
+1 for RDF::Vocab
Agreed. RDF::Vocab
RDF::Vocab it is! Let's make this change in rdf-vocab v0.3.0.
This is related to #9, but more specifically a question about the practice of adding vocab classes directly to the
RDF
module. Although the vocab-loader generates classes in theRDF
module by default (among other reasons, perhaps, for its own purposes?), I feel a little uncomfortable about extending that practice in this project. Although the prospect of naming conflicts with ruby-rdf does not seem great, certainly at this point, it's also something that's easier to change at this early stage than later. It's also not out of the question that some of "our" vocabs (RDF::LDP seems possible?) might be adopted by ruby-rdf -- in which case, it could be better if the names were different. Finally, I think it just makes clear that these vocabs are not part of ruby-rdf.An obvious choice would be
RDFVocab
orRDFVocabulary
.