Hi Lex,
Thanks for sending these suggestions. I actually disagree with all of these (for different reasons), but it's good to talk about them here. This mailing list could well be a more efficient way to discuss things than our weekly meetings, so I'm glad to have discussions here, in parallel with our meetings.
So, there are two aspects to this proposal: handling extensions, and handling "ontologies". Extensions first:
Here is the way I've been envisioning handling the installing and disabling of extensions (and skins): the "Canasta" installation would of course include a LocalSettings.php file, but that file might look something like this:
require_once( 'MyBeforeSettings.php' );
...DB settings, other standard MW configurations...
if ( ! in_array( 'ParserFunctions', MY_DISABLED_EXTENSIONS ) ) {
wfLoadExtension( 'ParserFunctions' );
$wgPFEnableStringFunctions = true;
}
if ( ! in_array( 'VisualEditor', MY_DISABLED_EXTENSIONS ) ) {
wfLoadExtension( 'VisualEditor' );
}
...and so on...
require_once( 'MyAfterSettings.php' );
This LocalSettings.php file would be expected not to be touched by administrators in any way - maybe it should actually be made read-only. Only updates of the entire "Canasta" installation would modify it. Then the two truly "local" files, MyBeforeSettings.php and MyAfterSettings.php, would be used by administrators to do all their configurations. Extensions could be disabled in the "Before" file, by adding extension names to the MY_DISABLED_EXTENSIONS array (and there could also be MY_DISABLED_SKINS). And changes to extension settings would have to be done in the "After" file. The addition of new extensions (or skins) could be done in either file - maybe it doesn't matter.
(By the way, it doesn't have to be called "My" - that's just my idea. Although of course that naming makes some sense.)
The advantage of this kind of system over one where extensions are installed/disabled via scripts is that it's a lot simpler: there are "Canasta" files (which are not to be touched) and there are "my" files (which can be freely modified), and there is nothing in between. There is no "state" of the installation that either the administrator or the code has to keep track of.
(One complication to this, which I think we did talk about a little before, is that there might have to be two extension directories, and two skin directories: /extensions and maybe /myextensions, and /skins and maybe /myskins. Hopefully there's a way to set that up so that wfLoadExtension() and wfLoadSkin() would always go to the right directory.)
Now, the other part, "ontologies": first of all, I usually call these "data structures"; I think that's a more accurate name than "ontologies", because I don't think an ontology usually includes a data entry part, like a form. Anyway, regardless of the name, I prefer the approach taken by the Page Exchange (PX) extension for this - install wiki pages through the wiki interface, not from a script. The advantage of the Page Exchange approach is that it's easier for an administrator to understand, and control, what's going on with these wiki pages through a special page rather than on a command line. Let's say that you want every installation of some "Canasta" product to include two packages of wiki pages: that "meta-ontology" (if I understand it correctly)
you have defined on GitHub, plus a package that defines a BPM data structure. If everything is installed via PX, the administrator can see at a glance that there are two distinct packages installed on the wiki - and they can remove one or both, or update them if new versions show up. On the other hand, if everything was installed from the command line, then an administrator (who may or may not be the same admin who did the installing) has no easy way to know where any page on the wiki came from - which package it comes from, or even if it came from a package at all.
Now, one advantage of a script is that it can be run automatically during the installation - so that, the very first time someone goes to the wiki, the data structure(s) are already there and there's never a "blank page problem". However, I think this could be done via PX as well: PX right now lacks an API, but one could certainly be added to it, so that the script that installs Canasta could, at the end, go to the API URL to import whatever package(s) are needed via PX.
Those are my thoughts, but I'm looking forward to your (or anyone else's) opinions.
-Yaron