Right now there are two things I would consider "complicated" about
Knockoff/T-assembly:
1. Currently the developer has to set up and run the pre-compilation
process themselves outside of MediaWiki (through a node.js interface). If
we can get MediaWiki to handle this part (via ResourceLoader), it would
hide that layer of complexity from the developer. This would be similar to
what we did for LESS support.
2. Text nodes have to be constructed from within the surrounding tags. This
isn't super complicated, but it's definitely unintuitive. Apparently, this
may no longer be an issue soon, as Knockout is introducing curly-brace
syntax, which is more widely known and intuitive for building text nodes.

Ryan Kaldari


On Tue, Jul 8, 2014 at 4:10 PM, Gabriel Wicke <gwi...@wikimedia.org> wrote:

> On 07/08/2014 03:04 PM, Rob Lanphier wrote:
> > At a minimum, it would seem to affect deployment performance.  We are
> much
> > more forgiving of things that slow down deployment than we are of things
> > that slow down typical page loads, but not infinitely forgiving.  How
> much
> > overhead would this add to deployments?
>
> This depends on how we wire this up. There would be no effect if
> compilation
> & caching happens dynamically in ResourceLoader, or a couple of ms per
> template if it's done on deploy.
>
> > Template compilation is hardly a new technique (Smarty anyone?), so I'm
> > assuming that technique could be (and has been?) applied to other
> engines.
>
> Indeed. Most fast engines are using compilation, and some like handlebars
> and knockoff also use pre-compilation for best performance.
>
> > I'm personally somewhat skeptical about Knockoff, but only somewhat.  My
> > main concern is that we don't end up adopting something that people will
> > consider to be yet another weird Mediawiki-ism, because we have a lot of
> > those.
>
> I wholeheartedly agree. The idea behind Knockoff is to complement a popular
> and rich reactive library (KnockoutJS) with a fast single-shot runtime
> (TAssembly) for server-side and simple client-side use cases. Both
> KnockoutJS and Knockoff / TAssembly are general-purpose templating
> libraries
> without ties to MediaWiki.
>
> Gabriel
>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to