| thiemowmde moved this task from in current sprint to monitoring on the Wikidata board. thiemowmde added a comment. |
In https://gerrit.wikimedia.org/r/382603, @thiemowmde wrote:I have to agree with @Aleksey_WMDE. The suggested approach basically makes an entire class a public interface. The past five years we learned the hard way that this is a pattern that should really, really be avoided.
That's why everything in our classes is private by default, and never protected.
You should consider everything in the Wikibase.git code base final. We are not technically enforcing this by adding the literal "final" keyword all over the place, because this would be more clutter than anything. But that's how you should think of our code.
What @Addshore wrote in T177022#3663888 also sums up what I would like to suggest:
- If you really need to introduce a new API module (which I would find really unfortunate), please do just that and make the code your own. Copy what you need, and leave out as much as possible.
- I also wonder what the problem is with resolving a page name to a page ID first, and then using this to query the existing "wbgetentities" module via the parameters it provides? What is the actual benefit the proposed shortcut gives you?
- An idea I like is to expand the existing "wbgetentities" API module in a way that it always accepts local page names. This could be done with a new parameter, or with the existing "titles" parameter. Such a feature will not only be useful for the MediaInfo entity type, but for all of them: Properties for example can then be requested via their full qualified page name, e.g. "Property:P1" (while "P1" is the entity ID to be provided via the "ids" parameter).
TASK DETAIL
EMAIL PREFERENCES
To: MarkTraceur, thiemowmde
Cc: Aleksey_WMDE, thiemowmde, Lydia_Pintscher, Addshore, gerritbot, Cparle, MBinder_WMF, Ramsey-WMF, Aklapper, MarkTraceur, E1presidente, Jmmuguerza, SandraF_WMF, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Acer, V4switch, Lewizho99, Maathavan, Susannaanas, Izno, Wong128hk, Wikidata-bugs, PKM, Base, matthiasmullie, aude, Bawolff, Ricordisamoa, Fabrice_Florin, Raymond, Matanya, Mbch331
Cc: Aleksey_WMDE, thiemowmde, Lydia_Pintscher, Addshore, gerritbot, Cparle, MBinder_WMF, Ramsey-WMF, Aklapper, MarkTraceur, E1presidente, Jmmuguerza, SandraF_WMF, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Acer, V4switch, Lewizho99, Maathavan, Susannaanas, Izno, Wong128hk, Wikidata-bugs, PKM, Base, matthiasmullie, aude, Bawolff, Ricordisamoa, Fabrice_Florin, Raymond, Matanya, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
