r24777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24776‎ | r24777 | r24778 >
Date:08:45, 14 August 2007
Author:proes
Status:old
Tags:
Comment:
Added a comment about architectural decisions.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php
@@ -29,6 +29,20 @@
3030 * proper separation of architectural layers, the Records should learn
3131 * to talk directly with the DB layer.
3232 * -this is what RecordHelpers are for.
 33+ *
 34+ * --- Comment by Peter-Jan Roes:
 35+ * I don't agree that proper separation of architectural layers means that
 36+ * Records and RecordSets should know how to save themselves to the database.
 37+ * Actually, altering Records and RecordSets this way increases the entanglement
 38+ * of architectural layers: Record(Set)s will need to know about a database,
 39+ * which is not to be preferred.
 40+ *
 41+ * Instead I think it is better to introduce another entity that carries this
 42+ * responsibility, for instance HierarchicalQueryEngine. This entity will know
 43+ * how to query an ordinary relational database (like MySQL) into the hierarchical
 44+ * data structure formed by Records and RecordSets. The same entity will be able
 45+ * to save back data to the database.
 46+ *
3347 */
3448 function initializeOmegaWikiAttributes(ViewInformation $viewInformation){
3549 // initializeOmegaWikiAttributesOld($viewInformation); //backward compatibility, will be removed!

Status & tagging log