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. This view is per article. It does not allow for making modifications to the article. Registering either an action or a special page will result in much the same behaviour for the user, with the exception of the URL structure, which is slightly different. For me as a developer there also is little difference, either I have some thing derive from Action and have 3 lines of code in it or from SpecialPage and have the lines here. Furthermore I've seen both approaches taken, and have taken both myself. So is one approach preferred?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Can it not in some way be included in &action=info ?
DJ
On Tue, Apr 23, 2013 at 2:46 PM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
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. This view is per article. It does not allow for making modifications to the article. Registering either an action or a special page will result in much the same behaviour for the user, with the exception of the URL structure, which is slightly different. For me as a developer there also is little difference, either I have some thing derive from Action and have 3 lines of code in it or from SpecialPage and have the lines here. Furthermore I've seen both approaches taken, and have taken both myself. So is one approach preferred?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Hey,
Can it not in some way be included in &action=info ?
In this case: no. That is however sidestepping my question :)
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
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. * The action interface is newer and cleaner, special pages are rather messy. * Actions can easily be overloaded by the content handler. * It's consistent with action=history, action=edit, etc. Of course, Special:WhatLinksHere is used for "extra info about a page" too.
I don't have a very strong preference, but I'd use an action.
-- daniel
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
On 04/23/2013 09:58 AM, Daniel Friesen wrote:
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.
The special page system clearly did not supersede actions entirely, or e.g. action=history would have become a special page.
Matt Flaschen
On Tue, 23 Apr 2013 13:07:20 -0700, Matthew Flaschen mflaschen@wikimedia.org wrote:
On 04/23/2013 09:58 AM, Daniel Friesen wrote:
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.
The special page system clearly did not supersede actions entirely, or e.g. action=history would have become a special page.
Matt Flaschen
Fine, it's legacy, un-explicitly deprecated. Just like legacy skins based directly on Skin instead of SkinTempate was for years.
And in the future &action=history very likely WILL become a SpecialPage, or something like it. We just don't use actions for anything new we create, period.
Hey,
Perhaps I have some misconceptions here, but was the Action class not "recently" (~1.18) introduced, and is it not required to use actions to specify behaviours for alternate content models?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
On Tue, 23 Apr 2013 16:02:56 -0700, Jeroen De Dauw jeroendedauw@gmail.com wrote:
Hey,
Perhaps I have some misconceptions here, but was the Action class not "recently" (~1.18) introduced, and is it not required to use actions to specify behaviours for alternate content models?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil.
Actions have existed for a long time before the Action class was created. The Action class basically migrated a bunch of actions we already had. And created yet another way of defining an action. 1.4+ hack into the UnknownAction hook 1.12+ use them MediaWikiPerformAction hook 1.18+ define an Action subclass ((Yes, all three of these still work)) ;) and for bonus points even though we have action classes now. The code for a number of these actions is STILL inside the Article class.
The Action class basically made it in besides a number of us objecting, groaning, and *facepalm*ing at the idea.
As for requiring actions for alternate content models. That was just a plain bad idea.
On Tue, Apr 23, 2013 at 8:46 AM, Jeroen De Dauw jeroendedauw@gmail.com 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. This view is per article. It does not allow for making modifications to the article. Registering either an action or a special page will result in much the same behaviour for the user, with the exception of the URL structure, which is slightly different. For me as a developer there also is little difference, either I have some thing derive from Action and have 3 lines of code in it or from SpecialPage and have the lines here. Furthermore I've seen both approaches taken, and have taken both myself. So is one approach preferred?
Special page, special page, special page. Actions suck.
-Chad
Here's my take on it:
From the design perspective, SpecialPages are superior. It's one of the
most mature controlling units in MediaWiki, primarily because current special pages do so many complex things there has developed a need for abstraction that handles many use cases. Actions, on the other hand, are on the verge of deprecation. In fact, many of the Actions in MediaWiki right now are literally fancy wrappers for function calls on an Article object.
However, from the URI perspective, Actions make sense. Since the information is directly related to the page, having the page's URI as the base makes logical sense. It's much better for the forms for deleting a page to be at http://mywiki/wiki/MyPage?action=delete then for it to be at http://mywiki/wiki/Special:Delete/MyPage, because the delete action is something be applied to the page, not the other way around.
With that in mind, I strongly recommend using a SpecialPage, because the infrastructure is better and eventually plans will be implemented to make the URI scheme for page-centric special pages more logical.
*-- * *Tyler Romeo* Stevens Institute of Technology, Class of 2015 Major in Computer Science www.whizkidztech.com | tylerromeo@gmail.com
On Tue, Apr 23, 2013 at 9:07 AM, Chad innocentkiller@gmail.com wrote:
On Tue, Apr 23, 2013 at 8:46 AM, Jeroen De Dauw jeroendedauw@gmail.com 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. This view is per article. It does not
allow
for making modifications to the article. Registering either an action or
a
special page will result in much the same behaviour for the user, with
the
exception of the URL structure, which is slightly different. For me as a developer there also is little difference, either I have some thing
derive
from Action and have 3 lines of code in it or from SpecialPage and have
the
lines here. Furthermore I've seen both approaches taken, and have taken both myself. So is one approach preferred?
Special page, special page, special page. Actions suck.
-Chad
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Tue, 23 Apr 2013 05:46:31 -0700, Jeroen De Dauw jeroendedauw@gmail.com 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. So is one approach preferred?
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
Make a SpecialPage.
Actions only exist for legacy reasons. There is no reason to create anything as an action anymore. In fact there are some of us that want to eliminate the action system entirely. https://bugzilla.wikimedia.org/show_bug.cgi?id=41836 https://www.mediawiki.org/wiki/Requests_for_comment/Drop_actions_in_favour_o...
wikitech-l@lists.wikimedia.org