What are the best practices for coding a wiki extension to survive MediaWiki updates? As a software engineer, I imagine you'd want to:
- Use the standard file/class layout prescribed in http://www.mediawiki.org/wiki/Manual:Extensions#Writing_Extensions. - Stick to calling a class's public methods, rather than accessing its $mFoobar members, whenever possible - Don't depend on implementation details of MW's methods, just the public interfaces - Call methods on the extension's $parser parameter, rather than $wgParser, when possible - Avoid modifying MediaWiki core code - Don't name your global variables beginning with "$wg" to avoid clashes (present and future) - Name your classes so they can't clash with MediaWiki's (past and future) -- maybe prefix their names with something unique, at least until PHP 6 namespaces are widespread - Don't hard-code English text, define system messages
I didn't see documentation on this sort of thing beyond what's on http://www.mediawiki.org/wiki/Manual:Extensions. Are there other best practices?
Thanks, DanB