Library Naming Conventions (machineName)
Submitted by dale42 on Thu, 09/15/2016 - 22:55
I searched for guidance on the website was not able to find it. Please just post the URL if I missed it!
Are there any generally agreed on naming conventions for the libary.json machineName and H5P library folder name?
The H5P related content is H5P.name. External libraries such as docxgen and flowplayer use the library name.
I'm not sure if the "H5P." is there to differentiate H5P content from libraries, or to designate the content as officially supported H5P.org content. Or perhaps both?
I suspect I should prefix my content type with a company or user name? For example, dale42.myH5PContentType or myCompany.H5PContentType.
Fri, 09/16/2016 - 09:02
Indeed, we need to create
I suggest that you use the H5P prefix as well and then just be aware that you call your library something unique. A quick search at github.com/h5p should reveal if it's taken. If you wish to have your own 'brandname' to ensure the recognition effect you could e.g. prefix all of your content types with H5P.Dale42ContentTypeName or something.
Be aware that you may only have one dot(.) in the machineName!
Also, try sticking to common CamelCase practices for the machineName/class names. E.g. Dale42Quiz, InteractiveDale42 etc.
... and if you could use kabab-case for the git repo that is best. E.g. h5p-dale42-quiz.
Thank you for asking!