This is exciting stuff. In similar news Flow and mobile now have a shared
ResourceLoaderTemplateModule [1] that supports shipping templates from
server to client.
As a next step we should explore making sure these two things are
compatible.
It would also be highly useful when it is in a stable form to run some
benchmarks against hogan and mustache on rendering time for some complex
templates.
[1]
http://MediaWiki.org/wiki/Extension:Mantle
On 7 Jul 2014 18:28, "Gabriel Wicke" <gwicke(a)wikimedia.org> wrote:
Hi all,
There are several new & exciting developments in HTML templating land.
First of all, Ryan Kaldari kindly tested the Knockoff / TAssembly HTML
templating library from a Mobile perspective [1,2], and summarized his
findings on the wiki [3]. The main missing feature he identified was the
ability to mark up control flow outside of HTML elements. To address this,
I
just added support for Knockout's comment syntax to the Knockoff compiler
[4]. This turned out to be straightforward, and required no changes in the
TAssembly runtime.
Secondly, Dan spotted two very promising developments in upstream
KnockoutJS:
== Knockout Components ==
There's a new version of KnockoutJS coming that might bridge a gap we saw
at
the architecture summit in January, the one between templating and
widget...ing. Knockout components [5,6] could be said bridge, they're
basically web components but possible now.
== Curly braces ==
The other thing they're adding is text interpolation so you can do
<span>{{name}}</span> and people don't have to be sad about
Knockout's HTML
attribute syntax. This can simplify the migration for existing handlebars
compatible templates as used by Mobile & Flow.
The KnockoutJS release is currently in early beta [7], with the release
expected later this summer.
Gabriel & Dan
[1]
https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library…
[2]
https://github.com/gwicke/knockoff/,
https://github.com/gwicke/tassembly/
[3]
https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library…
[4]
https://github.com/gwicke/knockoff/commit/0e516979c3d1fb35489c58e7b659c3ad0…
[5]
http://www.knockmeout.net/2014/06/knockout-3-2-preview-components.html
[6]
http://blog.stevensanderson.com/2014/06/11/architecting-large-single-page-a…
[7]
https://github.com/knockout/knockout/tree/gh-pages-3.2.0
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l