Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -29,6 +29,20 @@ |
30 | 30 | * proper separation of architectural layers, the Records should learn |
31 | 31 | * to talk directly with the DB layer. |
32 | 32 | * -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 | + * |
33 | 47 | */ |
34 | 48 | function initializeOmegaWikiAttributes(ViewInformation $viewInformation){ |
35 | 49 | // initializeOmegaWikiAttributesOld($viewInformation); //backward compatibility, will be removed! |