I have been working on the ResourceLoader branch, where I've ended up writing a CSSMin class which performs CSS minification, URI-remapping and data-URI in-lining. It got me thinking that this class would be pretty useful to non-MediaWiki projects too, but sadly we don't have a history of sharing in this way...
* Software we've ported to PHP ourselves like our native-PHP CDB implementation or CSSJanus are buried in our code-base, and make use of a couple of trivial wf* global functions, making it somewhat inaccessible to third-party users. Which sucks because third-party users are important! They use the code in their own systems, make improvements and potentially pass them back to us, however if we don't make these things more general-purpose the code will more likely get taken from our repository, tweaked and never passed back; if we don't make it more easily accessible the code will never be found and we won't be taking advantage of the entire PHP development community. Sadness... * Software we've borrowed from other projects like JSMin are also buried within our MediaWiki-proprietary code, and while these libraries can operate independently of MediaWiki, we need to make it clear that they should be kept in sync with their original sources both, upstream and down. * Software we've created is often potentially useful to other projects, but unfortunately tied to and buried within MediaWiki. In some of these cases, the ties to MediaWiki are trivial and could be either optional or removed entirely, and the component could be factored out to a more general-purpose library, available for re-use.
I don't have a very mature proposal for solving this completely, but as a first step, it seems like we should have a libraries folder which we can move things that can function in a stand-alone manner to. Initial candidates appear to be libraries that already function in a stand-alone way such as JSMin.php, CSSJanus.php, and CSSMin.php (in the resourceloader branch right now but will be coming to trunk soon). Additional software could be moved into this space after some un-tethering such as Cdb/Cdb_PHP, DjVuImage, etc.
Overall, I think it would be great if we could take a look at this and other ways to better share our work with non-MediaWiki projects, and give back to the open-source community.
I welcome your thoughts and input.
- Trevor