On Tue, 23 Apr 2013 06:07:15 -0700, Daniel Kinzler daniel@brightbyte.de wrote:
On 23.04.2013 14:46, Jeroen De Dauw wrote:
Hey,
At the risk of starting an emacs vs vim like discussion, I'd like to ask if I ought to be using a SpecialPage or an Action in my use case. I want to have an extra tab for a specific type of article that shows some additional information about this article.
I would use an action, for several reasons:
- It's always *about* some page, it's something you do with a page.
Which is what actions are for.
Actually actions are just a legacy system that existed before special pages came into play. Nothing was ever explicitly picked to be an action just because it related to a page. In fact we have a ancient action that isn't relevant to a page at all, &action=ajax.
- The action interface is newer and cleaner, special pages are rather
messy.
Mind pointing out what is messy about special pages? If you've got an actual issue with them some of us would probably like to actually fix it. Cause actions were in fact the older interface. Till one or two people attempted to bring them up to date with the SpecialPage system that superseded actions entirely.
- Actions can easily be overloaded by the content handler.
Has anyone actually made use of this feature?
- It's consistent with action=history, action=edit, etc. Of course,
Special:WhatLinksHere is used for "extra info about a page" too.
Actually it's not consistent at all. As Krinkle notes: """ For example the following ones are all related to a page (query): * Special:WhatLinksHere * action=view * action=history * action=info
And these as well (more manipulations of state, less information retrieval): * action=delete * Special:Undelete * Special:MovePage * action=purge * action=edit * action=protect """
The only reason any of these use an action is because they were originally written long ago, potentially before we even had special pages.
I don't have a very strong preference, but I'd use an action.
-- daniel