Last modified: 2014-09-25 16:37:22 UTC
We could really use templates to untangle SkinMobile.php. Since we'll be using Mustache[1] templates in JavaScript (or specifically the Hogan[2] implementation), we could also consider using them on the server side. Logic-less templates enforce separation between logic and presentation because you simply can not write any code inside them. Separate files for HTML and PHP code for the win! [1] http://mustache.github.com/ [2] http://twitter.github.com/hogan.js/
I've experimented with this and it's beautiful: https://github.com/jdlrobson/Minerva/blob/evenmorevanilla/Minerva.php#L72 We should probably drive work on the skin and then create a RFC to see how people feel about bringing in an external library..
Assigned Mingle Ticket https://mingle.corp.wikimedia.org/projects/mobile/cards/719
Related URL: https://gerrit.wikimedia.org/r/69756 (Gerrit Change I742eb3587f3736a9c1932bc86ee59c4fe26ca434)
We will be exploring this as part of the UI standardisation project (templating in core)