User:PC-XT/Personal Template Guidelines
This page is for working out standard !votes for WP:TfD. I may develop it into an essay or something, later, but for now, it is just for personal reference. WP:OR, anyone? Feel free to comment on the talk page. I like to hear your opinions.
Templates are pieces of content used in many articles, and are not meant to be full articles, themselves. Unlike articles, templates often have a high amount of code content, relying on parameters in the article to provide most of the content.
There is also Wikipedia:Infobox consolidation.
Is anyone using this?
[edit]Templates may be transcluded or substituted. Transclusions can be checked by Special:WhatLinksHere, while it may be hard to find substitutions.
If a template is unused, it can often be deleted. Undeletion may be possible later, if a problem is found.
Redundancy
[edit]Reduncancy is a problem where two templates have the same usage. Usually, two editors make the templates independantly, to solve the same or similar problems. Because it makes maintaining templates harder, it is good to solve the problem where possible. There are several remedies:
Delete and replace
[edit]If a template can be fully replaced by another, better designed, template, it should be deleted and replaced. This is always beneficial, because no necessary information is lost.
Merge
[edit]If a template can almost be replaced by another, better designed, template, but has features that that template does not have, someone may be able to add the features to the better template, which would then allow for Delete and replace. All of this together is a merge.
Wrap
[edit]If a template is different enough, such as having parameters with different names and/or uses, it may be refactored to call the better template, translating the params, and adding any extras.
Modularize
[edit]If a merge is not desirable, as an alternative to Wrappers, a module may be created to be used inside the better template as a subtemplate. The module would hold the extra stuff that does not fit in the better template.
Substitute
[edit]If the template is simple enough, it can be substituted into articles that use it. The code from the template replaces the template|param code in the article. This can be useful for old wrappers, which can then be deleted as unused.
Keep
[edit]Can redundancy be a good thing?
There is a [humorous] saying that some editors will not be happy until there is only one template, into which all others have been merged. In actuality, several barriers exist that hold up template merges.
The Visual Editor has trouble with some kinds of merged template parameters. Template:Coord, for example, at the time I write this, has redundant templates made to comply with the Visual Editor design. These templates are currently being considered for deletion, as redundant, while some want the Visual Editor fixed to handle all parameters. [links go here]
If merging would make the better template too complex or otherwise be technically too hard, it may not be feasible.
Many editors use their templates as tools, honing them to their needs, sometimes for years, then one day, they find that outside editors came in with their TFD tags, and suddenly there is one week to decide the fate of one or more trusty tools. Editors can be very touchy about their tools. Will this new thing work the same? Can I even use it? The documentation looks more complicated. Why is there a problem with the tool I use? It is a very uneasy feeling that comes with progress. All editors should be understanding about this. Nobody is doing anything wrong, here. It is a great opportunity to improve things, if we work together.
I, myself, in some cases, would prefer more, smaller, simpler, streamlined templates, with less wikicode, organized into subpages. I am working on that idea, though it probably will not catch on very fast, as there is so much momentum in the other direction...
[References needed]