"Jeroen De Dauw" posted a comment on MediaWiki.r111264. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111264#c30880
Commit summary for MediaWiki.r111264: adding DBDataObject class after having some people review it and posting on the list. docs can currently be found at https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/DBDataObject Jeroen De Dauw's comment: > and in most classes you don't need to extend it. In ALL cases for every extension I used this for, it would need to be extended, in most cases very non-trivially. After all, if you have a class Course that represents a row in the courses table, all course logic goes there right. So I don't think you'd gain much advantage by doing this, although there is of course no reason to go enforce deriving. Either way, I don't think this is an issue. What I think is silly is that the table classes will often end up just holding the methods returning table specific data. I can't think of any table specific logic I'd put there (everything that can be derived from the info the class holds can be abstracted out to the parent class). So good things of this approach: * No need for LSB AFAICS * Nicer separation between table and row specific functionality. Things I like less: * Two classes needed for almost all types instead of one. * Table classes will likely just hold three or so methods returning table info. In a scenario where PHP 5.3 could be used everywhere, I don't think the advantages would be worth the disadvantages, so I'm hesitant to make such changes. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
