DrupalCon Austin 2014: TWIG IS DEAD. LONG LIVE WEB COMPONENTS!
Speakers: JohnAlbin
-hyperbole-alert- Everyone is excited about Drupal 8's Twig system, but it's already dead to me. end-hyperbole-alert- The W3C is working on a specification for a templating system that is native to the HTML language, called Web Components.
With web components, we'll be able to define and instantiate our own templates from within HTML. We can even create our own custom elements. Best of all, with the Shadow DOM, our templates encapsulate styling (CSS) and behavior (JS) within them, eliminating conflicts and easing integration of multiple building blocks.
There is so much awesome in the Web Components spec, but switching to it will make switching to HTML5 look like a cake walk. There is a lot to do! (And the spec is still unfinished!)
Will Web Components be ready to use for Drupal 9? (dunno.) Will we be ready to use them? (you bet!)
But we have to start planning now and start evolving our current codebase (including Twig) to make the transition easier. By building component-like bundles of CSS, Twig templates, and JavaScript into Drupal 8 (and 9), we can bring the core concepts of Web Components into Drupal right now!
In this session, I'll give a brief demo of Web Components and the Shadow DOM, discuss the benefits, and then we can hash out a plan of attack.
-hyperbole-alert- Everyone is excited about Drupal 8's Twig system, but it's already dead to me. end-hyperbole-alert- The W3C is working on a specification for a templating system that is native to the HTML language, called Web Components.
With web components, we'll be able to define and instantiate our own templates from within HTML. We can even create our own custom elements. Best of all, with the Shadow DOM, our templates encapsulate styling (CSS) and behavior (JS) within them, eliminating conflicts and easing integration of multiple building blocks.
There is so much awesome in the Web Components spec, but switching to it will make switching to HTML5 look like a cake walk. There is a lot to do! (And the spec is still unfinished!)
Will Web Components be ready to use for Drupal 9? (dunno.) Will we be ready to use them? (you bet!)
But we have to start planning now and start evolving our current codebase (including Twig) to make the transition easier. By building component-like bundles of CSS, Twig templates, and JavaScript into Drupal 8 (and 9), we can bring the core concepts of Web Components into Drupal right now!
In this session, I'll give a brief demo of Web Components and the Shadow DOM, discuss the benefits, and then we can hash out a plan of attack.