Currently, MediaInfo relies on the Wikibase data model for how Statements are handled. There are both pros and cons for this approach.
Pros:
- We can rely on existing code instead of writing/maintaining our own
- Features already exist in Wikibase that we could use to address issues such as this one: https://phabricator.wikimedia.org/T221015
Cons:
- Our extension becomes "tightly coupled" with Wikibase
- If Wikibase changes their data model internally (which sounds like it may be happening eventually), our own functionality could break with little warning
- If a core data structure like the Statement is an external dependency, it will be harder to write good unit tests: we will need to mock out much of that functionality which means our tests diverge further from the real world
- It will be easier to reason about what is going on in our own code if we don't have to cross-reference with classes inside another (quite complex) codebase.
If we decide we do not want to rely on Wikibase classes internally, we wil need to develop our own. We would also need to add some sort of API adapter class which would become the "point of contact" between our extension and Wikibase before data gets translated into our own models.
Let's decide as a team how we want to proceed, then we can create other sub-tasks based on the course of action we choose.