On Wed, Aug 27, 2014 at 12:17 AM, Antoine Musso <hashar+wmf(a)free.fr> wrote:
Le 27/08/2014 08:59, Niklas Laxström a écrit :
At this point about everyone needs templating
library as soon as
possible and do not want to get blocked by the RFC.
You can use Handlebars templates, implemented by Lightncandy in PHP and
provided as ResourceLoader modules by the Mantle extension.[1] Tested,
working, passed security review, fast according to the table in the
templating RFC. Flow uses the same templates in both PHP and JS, though of
course we have to implement helper functions in both languages.
There are genuine benefits to Gabriel Wicke's Knockoff-Tassembly
approach[2] including DOM-based templating and reactive updates in
JavaScript if you use full knockout.js. So the Flow team hasn't been
involved in the RFC, assuming that Knockoff-Tassembly will be the eventual
approach. Are we now reevaluating?
As I understand Jon summary, the idea is a proof of concept based on
Mustache that would be out of mediawiki/core. Any
experience acquired in
that experiment would help move forward the HTML templating library RFC in
one way (twig) or an other (mustache).
AIUI I don't see much win in mustache. It's not faster and does less than
handlebars. Twig/Swig does more (macros, parent, extends, more?) which can
result in worse separation of concerns.
"There can be only one" (Highlander), or two or three in the meantime :-)
Cheers,
[1]
https://www.mediawiki.org/wiki/Extension:Mantle#Templates
[2]
https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library…
--
=S Page Features engineer