samvera-deprecated / rdf-vocab

Shared RDF Vocabularies (rdf-vocab <= v0.7.0)
https://github.com/ruby-rdf/rdf-vocab
Apache License 2.0
4 stars 2 forks source link

Use the RDF module for vocab classes? #19

Closed dchandekstark closed 9 years ago

dchandekstark commented 9 years ago

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 the RDF 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 or RDFVocabulary.

jcoyne commented 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.

gkellogg commented 9 years ago

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.

gkellogg commented 9 years ago

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.

artob commented 9 years ago

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.

dchandekstark commented 9 years ago

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?

acoburn commented 9 years ago

+1 for RDF::Vocab

jpstroop commented 9 years ago

Agreed. RDF::Vocab

dchandekstark commented 9 years ago

RDF::Vocab it is! Let's make this change in rdf-vocab v0.3.0.