Jump to content

Wikipedia:Avoid using meta-templates: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Scope creep
BlankVerse (talk | contribs)
Line 27: Line 27:


=== Scope creep ===
=== Scope creep ===
The existence of some meta-templates has resulted in an explosion of related "child" templates. This is most often because creating a new one is simple given the existence of the meta-template. The primary example of this is [[Wikipedia:Stub categories]], which lists templates created using the [[Template:Metastub]] & [[Template:MetaPicstub]]. There are literally hundreds of these stub templates, many of which have been created on the spur of the moment for use on only a few articles and are not even documented on the main page. Although each new one was probably created in good faith, the sheer number of these templates has grown tremendously. Already, a many of these new "child" templates have come up for deletion.


The existence of some meta-templates has resulted in the creation of related "child" templates. This is because creating a new one is simple given the existence of the meta-template. The primary example is [[Wikipedia:Stub categories]], which lists templates that are usually created using the [[Template:Metastub]] & [[Template:MetaPicstub]]. There are now roughly 250 topic stubs in [[:Category:Stub categories]]. Although each new topic stub was created in good faith, the are now a large number of these templates. Already, a few of these new "child" templates have listed for for [[WP:TFD|deletion]].
One of the almost paradoxical effects of this growth is that, as more and more "child" templates are created, there is less of a chance for any particular change to be made to the meta-template, because of the wider effect.


== Alternatives ==
== Alternatives ==

Revision as of 13:00, 12 February 2005

This is a proposed new Wikipedia policy or guideline as part of Wikipedia:Policy thinktank

Template messages allow certain standard text to be included on many pages, usually with the idea that in the future, any changes to that text block can be changed in one place. "Meta-templates" as used in this article are those that are created and used to keep other templates in a standard format. This page is an attempt to gather information supporting the assertion that so-called "meta-templates" (or master templates) are harmful to Wikipedia. In other contexts, the term "meta-templates" may refer to templates containing "meta" information (i.e., the templates do not add content to an article but rather describe or classify the article in some way that is relevant only in the context of Wikipedia).

Convenience is often cited as the reason for using meta-templates, much like all templates. Certainly, it offers a central place with which to effect changes across a wide number of articles.

Examples of meta-templates currently in use on Wikipedia:

Harmful effects

Server load

In normal cases, a single template entry is checked each time a page is displayed. When using a meta-template, each non-cached view adds one additional call. For templates that include parameters, this operation also adds incrementally to the processing time.

Each time a page is saved, all of its links from it are refreshed, including the reference to the template (and meta-template) being used. So when I update a page like Republic of Canada, the database creates all the normal links, and one to Template:Canada-stub and one to Template:MetaPicstub. Look at Special:Whatlinkshere/Template:MetaPicstub - none of those articles are actually calling it directly – they are just "false links". Because all links are purged and re-created on page save, it takes a lot more time and server resources than even the database read in the first place.

When a template is changed, all pages involving that template are marked as invalid and uncachable (by changing the database entry of every page which uses the template) and must be purged from the Squid cache servers. On the next view of each of those pages, the apache web servers must carry out the slow operation of rebuilding the page, increasing the load on them and slowing down the site. When individual work templates are involved, the flushing is limited to only the individual work concerned. When a meta-template is changed, the effect purges the cache of thousands of pages.

Vandalism

Meta-templates, which would be featured on a very high percentage of pages, are an excellent denial-of-service attack vector, since changing it or any component used in it would flush a substantial percentage of the site caches, which are critical to site performance and normally serve some 75-80% of all hits. Making even one subtle change, like the addition of a space, causes the effect.

In addition to the specific update issues for each template, the template's Whatlinkshere, image description pages and all other components involved in the template become denial of service attack vectors, since they can involve reading very large numbers of database entries or updating very large numbers of pages when they are changed.

Of course, more obvious forms of direct vandalism are possible when using these meta-templates.

Scope creep

The existence of some meta-templates has resulted in the creation of related "child" templates. This is because creating a new one is simple given the existence of the meta-template. The primary example is Wikipedia:Stub categories, which lists templates that are usually created using the Template:Metastub & Template:MetaPicstub. There are now roughly 250 topic stubs in Category:Stub categories. Although each new topic stub was created in good faith, the are now a large number of these templates. Already, a few of these new "child" templates have listed for for deletion.

Alternatives

  1. Design, document, and implement - In the case of Wikipedia:Sister projects, a proposal was made to use a meta-template. In this area, it is much better to decide on a common look and format, and then implement it across the few templates being used. When there is consensus for a change, interested editors can apply them. Creating a page which displays each template also helps to locate templates which don't follow the standard format.
  2. Use lists, not templates and categories - In the case of Wikipedia:Stub categories, if the goal is to assist people with specific topic interests in finding articles that need work, then create lists of articles to be worked on. Many WikiProjects also maintain an area for reporting articles with need work.
  3. Fix the problem, don't mark it with a template - If more effort was made correcting the problems which usually call for the use of a notice or template, fewer templates would be needed, less often.
  4. CSS - Some meta-templates serve as glorified stylesheets. If these were identified, CSS classes could be added to the site's global stylesheets. Then, those meta-templates could be replaced with the CSS classes in relevant Wikipedia pages. This would accomplish the same purpose – maintaining uniform style across the site – without placing a burden on the server.