Core Platform Team/Initiatives/Article

From mediawiki.org
Jump to navigation Jump to search

Initiative Vision

< Initiatives

Vision:
  • Page "types" become a well defined and extensioble concept in MediaWiki
  • Boundaries between the responsibilities of WikiPage, Article, and Action are cleaned up
  • Extensions can easily define new page types.
Stakeholder(s):
  • MediaWiki developers (core and extensions) will benefit from clearer, more testable code
  • Extension developers (in WMF and elsewhere) will have more control over the behavior of pages their extension manages.
  • Quality + test engineering may be interested since we are making code more testable by removing special cases throughout the code base
Problem:
  • Special behavior for each kind of page (e.g. articles, file pages, categories, talk pages, user scripts, etc) is hard coded in various places across the code base.
  • WikiPage acts as a root of a class hierarchy that mirrors the one rooted in Article
  • The Article base class is huge, implementing behavior for several different UI actions
  • Extensions cannot easily define new kinds of pages. They have to use hooks to modify the behavior of existing kinds of pages.
Solution:
  • Define special behavior for each kind of page (e.g. articles, file pages, categories, talk pages, user scripts, etc) in subclasses of Article.
  • Remove the WikiPage hierarchy
  • Extract action handling code from Article into Action classes.
  • Create a registry system for page types, allowing extensions to register their own.
Aligned Goals:
  • Improve code quality by reducing coupling
  • Improve code health by improving testability
  • Improve maintainability by modeling domain concepts clearly
Success Metrics:
  •  
  •  
  •  



Subpages