Extension:ArticleProperties

From Organic Design wiki
Revision as of 18:26, 1 March 2012 by Nad (talk | contribs) (another project)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Project MediaWiki has a page properties table which is used to store and manipulate named property lists for articles. The parser includes the required hooks to integrate with this properties system in an event-driven way so that other functionality that depends on these values can be prompted to update their state when changes occur.

Since template parameters play such an important role in wiki based data structures, it makes sense that the named parameters of the template should be stored in the properties table, so that templates can effectively become objects that have both properties and methods.

It also allows much more efficient querying of properties defined in template syntax since these queries can be carried out directly on the properties table rather than having to convert wikitext which is much more expensive even with caching.

The first useful application would be to change the #recordtable parser-function to use the properties table instead of referring to the wikitext. The RA extension has methods for converting to and from value-arrays and wikitext template syntax, so this could be implemented easily be effectively using the properties table as a "live" cache tied into those two methods. But also the queries in the parser-function should be updated too since they no longer need to refer to the text field of the articles.