> In the
> meantime, some developers (such as the Mobile and Flow teams) have
> short-term needs that can't wait up for Knockoff to become a complete
> solution, and so are working out interim standardizations outside of
> this mailing list so that they can move forward while Knockoff work
The first iteration of the implementation has actually been complete for a
while now, see Matt's mail here on April 14 . There's a JS implementation
of the KnockOff compiler  and JS  and PHP  implementations of the
We are waiting for feedback before starting the second iteration. At least
the mobile team had plans for giving it a spin, but I have not heard about
For client-side templating you need ResourceLoader to
templates to the client. Jon Robson has developed the Mantle
extension that implements
* a ResourceLoaderTemplateModule that does this
* JS functions that abstract getting a template, compiling and caching
it, and rendering it
* specific implementations of these functions for the handlebars and
hogan JS libraries.
MobileFrontend and Flow will start using this shared code in
production in the next few weeks or so.
In order for Flow to share templates between front-end JS and server
PHP, Flow has had to write helper functions in both JS and PHP.
Some like message i18n, human-friendly timestamps, escaping, etc. are
more generic than others.
These experiences in generalized JS template support and developing
helper functions across JS and PHP could inform Knockoff development.
Yes, large parts of this infrastructure will be useful with Knockoff /
TAssembly as well.
Should I be
saying Knockoff or Knockout?
From the RFC page, Gabriel WIcke & Matthew
templates are KnockoutJS compatible. AIUI, GW&MW have a JS compiler
that compiles them into GW&MW's "Knockoff - Tassembly" intermediate
representation, and their goal is to to render templates in the latter
KnockOff is the KnockOut template to TAssembly compiler, while TAssembly is
the JSON-based intermediate format with runtimes in JS & PHP.
the Knockout JS for its reactive model-view updates.
This is possible due to the shared template syntax, but not necessary. If
reactivity is not needed & performance / size is a priority then using the
TAssembly runtime might make more sense. It's a lot smaller & faster.
KnockOff & TAssembly are a part of the longer-term vision of moving to HTML
as our primary content representation. I have started to draft a high-level
overview at . We (the new service team ) plan to explore this further
in collaboration with the Parsoid team.