Frontend standards group/2014-09-25-Weekly


Templating languageEdit

RFC quick review...Edit

  • mustache?hogan?which do we use?
  • pretty much everybody's saying mustache/handlebars (keep it simple)
  • what's the difference with hogan? (a reimplementation)
  • TODO: figure out what differences if any for the recommendation
  • lightncandy -- handlebars PHP implementation
    • very fast
    • flexible, works with logic in templates
    • recommended by shahyar

Flow examples:


DOM-based / ability to bind propertiesEdit


  • Security. Significantly improve ability to enforce and review security.
  • Performance of addition/updates (not initial render): Improves front-end re-rendering/update performance 1) a template lib can render minimally, more finetuned than manually selecting/updating ever could, plus no selector overhead. 2) a template lib can combine reflows, whereas a widget abstraction would not realistically do this.
  • Non-intrusive. It's a silent non-intrusive feature. Doesn't make it harder for developers day-to-day. Manually selecting still works if you want to or have to.

Roan: Testing. One can lint templates. Gabriel: There's DOM-based libs that parse mustache/handlebars-like syntax even. <- this could be very interesting for later

Precompilation server-side can improve sever-side (memcached?) and front-end (resourceloader) execution.


What are the advantages of picking a library that wouldn't support DOM/bind properties?

  • Supports placeholder values that produce invalid HTML.

Brion's recomendation is to move forward with handlebars and keep watch over dom based template libraries for the future. Brion will take this recomendation to the arch comittee

  • coding guidelines -- beware of helper functions (or even disallow them ;) (they're in use in flow but need cleanup)
    • helpers must be registered explicitly. recommend locking down and not doing too many yet.
    • (note theyd have to be implemented separately for JS and PHP)

Server-side OOUIEdit

    • How to bind the generated HTML to the JavaScript objects.
      • (shared html templates that are recognised, KnockoutJS-like bind detection without rerendering the DOM)
    • Need to reconstitute live objects from static HTML as well as when building from scratch
      • Config array could be added as data attribute; walk the DOM tree to find parent/mixin parameters
      • Note that things can be added in JS (progressive enhancement)
      • -> Trevor going to test with using the same 'enliven' path after either construction method


Brion to take our input to next RFC meeting on Wed. Trevor to experiment with revival of HTML to JavaScript object.


Agenda for next meetingEdit

Status check inEdit

  • Icons
  • Skin System
  • Roadmap