H5P Platform Integration Experiences and Suggestions
as you may know already, we are developing and mainting a H5P platform integration plugin for NeosCMS (which can be found on GitHub). I would like to share some of our experiences in developing and maintaining that plugin with you, and suggest a few things that may benefit other developers of platform integration plugins as well as yourself.
There are two things which make life quite difficult for us:
* There are no change logs for changes to the public API of the H5P core. When I upgraded the core from 1.18 to 1.20, I needed to trace through the changes on GitHub and try to reflect them in our platform code. Since I couldn't always see how data types/formats changed (especially when metadata were added to the H5P content params), I additionally had to run the wordpress plugin locally and check which data it sent to the backend in some cases. That took a very long time and introduced some nasty bugs which we didn't find until later. Some changelogs would help out massively here, especially when you change data formats / types for APIs.
* That brings me to the second point: It's very hard to understand in which format Content and Library objects are passed from one function to the next within H5P and to the platform integration functions. You're using associative arrays everywhere, but not in a consistent way - sometimes a full content array is passed, sometimes only the Id, only the parameters, with and without metadata.. that makes it very hard to understand which data is needed where. You're doing a very good job by providing interfaces to implement for the H5P core (e.g. H5PFrameworkInterface, H5PFileStorage etc) - it would be a huge help if you could also create interfaces to implement for the Content and Library objects and use them consistently throughout the H5P core).
I am aware that this may not be your first priority. Still I think these are suggestions that benefit the project in the long run. We'd love to start a conversation about that and see how we can maybe even support with making some of these changes.