Requests for comment/MVC framework

Wikia has developed an MVC framework called Nirvana. Documentation is available here: | Developer Wiki

This is currently interwoven with some unrelated utility code that would need to be separated, but the implementation is similar to the existing QuickTemplate combined with a DataTransferObject pattern. The main goal was to separate data from presentation and get away from the Xml object by just using plain HTML templates and simple variables in the template. The templates are still PHP files but by convention we do not put (much) logic there. We have also added support for Mustache templates to allow use of the same templates in the front end code. Any controller class can provide a PHP array (for internal callers), JSON data for javascript, and a rendered HTML template for UI. There is also "Service" class that just provides data.

We would be interested in reviewing this code with some other developers to see if it might be useful to the Foundation for building new core special pages and extensions. The framework is specific to Mediawiki right now, but it could be considered a "mini-framework" and separated into a standalone library without much work. Most of the functionality is oriented towards making it easier to build special pages and ajax functions.

Example code:

Example template. All public controller properties are exported as globals to the template context. HTML fragments or entire HTML doc, either is fine :

To call this controller and use this template from a second template you can include/render it with a single line in a couple of ways