SlideShare uma empresa Scribd logo
1 de 60
By @LostInBrittany
Web Components today
Horacio Gonzalez
Spaniard lost in Brittany, Java developer,
dreamer and all-around geek
• Senior Software Engineer at Crédit Mutuel Arkea
o Currently...
• Leader of the FinistJUG and the
BreizhBeans community
http://lostinbrittany.org/
+Horacio.Gonzalez
@LostInBrittany
BreizhBeans
Developer community at the far end
of French Brittany
http://breizhbeans.org/
@BreizhBeans
Introduction
Because I love to tell old stories
At the beginning we had the thick client
• Widget : basic building blocks of your UI
o
Encapsultation
o
Reutilisation
In thick client you create your UI by widget assembling
Image : Wikipedia
Web development was unlike thick-client
• HTML/CSS/JS didn't support widgets
o
Page where the building blocks
Web apps were page oriented
Image : IBM
GWT gave back widgets to web devs
• GWT uses a thick-client-like development paradigm
o
Widgets, properties, events
GWT web apps are widget oriented :
Single-page apps
Image : GWT Mail sample app
Single-page apps are a current trend
• From UX POV single-page apps are richer
o
But making them without widgets is painful
HTML/CSS/JS needed a widget standard
Image : Ken Schultz comedy juggler
Web Components
Reinventing the wheel...
and this time making it round
Web Components : a W3C standard
• Web Components standard is being worked at W3C
o
We all know what this means
o
Clue : HTML5
They will work for years, bickering and fighting
Browsers and devs will use the WiP document
Example : the Google+ button
• If you want to place a Google+ button in your page
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-annotation="inline" data-width="300"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
Example : the Google+ button
• And what I would like is simple
<g:plusone></g:plusone>
Example : the Google+ button
• To be fair, Google already makes it simpler
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script>
...
<g:plusone></g:plusone>
• They create directives with JS to emulate components
o AngularJS approach
o Respecting the spirit of the future standard
o Working in current browsers
Another example : the RIB
• If you're French, you know what a RIB is
o
A banking account identification number
• To show a RIB in HTML:
o All styling, all surface control must be done elsewhere by CSS and JS
• What I would like
o A semantic tag
o With encapsulated styling and surface controlling
<div class="rib">58496 87451 00014500269 74</div>
<x-rib banque=58496 guichet=87451 compte=00014500269 cle=74> </x-rib>
But we already can do that!
• In most modern frameworks we can already do
components, in a way or another
o And all those ways are different!
o Using different JavaScript libraries
o Almost no component sharing between frameworks
• W3C's works aim to make a standard way
o Supported natively by all browsers
o Allowing for component reuse
The 5 pillars of the Web Components
• Templates
• Shadow DOM
• Custom Elements
• Decorators
• Imports
Templates
The clone wars
Templates
• A reusable model
o Contains markup intended to be used later
<template id="commentTemplate">
<div>
<img src="">
<div class="comment-text"></div>
</div>
</template>
Templates before <template>
• How did we do templating before
o Using display:none or hidden
o Putting it inside a script
o Type unknown to browser, it isn't interpretated
o Markup easily recovered via .innerHTML and reused
o Approach used by many template engines
<div id="commentTemplate" class="comment" hidden>
<img src="">
<div class="comment-text"></div>
</div>
<script id="commentTemplate" type="text/template">
<div class="comment">
<img src="">
<div class="comment-text"></div>
</div>
</script>
• Uniformising those approach with a new tag
<template id="commentTemplate">
<div>
<img src="">
<div class="comment-text"></div>
</div>
</template>
• Content inside the tag is parsed but not interpreted
o HTML not shown
o Resources are not loaded
o Scripts not executed
The <template> tag
Template instantiation
• Using JavaScript
<template id="commentTemplate">
<div>
<img src="">
<div class="comment-text"></div>
</div>
</template>
<script>
function addComment(imageUrl, text) {
var t = document.querySelector("#commentTemplate");
var comment = t.content.cloneNode(true);
// Populate content.
comment.querySelector('img').src = imageUrl;
comment.querySelector('.comment-text').textContent = text;
document.body.appendChild(comment);
}
</script>
Shadow DOM
Join the shadowy side,
young padawan
Image: Springfield Punx
Encapsulation
• Each component should have
o Public interface
o Private inner code
• When using a component
o You manipulate the interface only
o You don't need to know anything about inner code
o No conflict between inner code and outside code
Encapsulation before Shadow DOM
• Only a way :
<innerFrame>
Image : Star Trek the Next Generation
Browsers already use encapsulation
• Considerer this simple slider
o How is is done inside?
o With HTML, CSS and JS!
o It has a movable element, I can recover it's position
o Why cannot see it in DOM tree?
• Browsers hide DOM sub-trees for standard components
o They have a public interface and hidden inner code
• That's Shadow DOM!
<input id="foo" type="range">
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
</video>
Image: Springfield Punx
My name is DOM, Shadow DOM
• Shadow DOM: ability of the browser to
o
Include a DOM subtree into the rendering
o
But not into the main document DOM tree
• In Chome you can see the Shadow DOM
o By activating the option in Inspector
Looking into the Shadow
• For the slider :
Shadow DOM is already here
• Browser use it everyday...
o For their inner needs
o Not exposed to developers
• Web Components makes Shadow DOM available
o You can use it for your own components
Image: Springfield Punx
Using Shadow DOM
• There is a host element
o A normal element in DOM tree
• A shadow root is associated to the host
o Using the createShadowRoot method
o The shadow root is the root of the hidden DOM tree
Image: W3C
Using Shadow DOM
• Quick and dirty Shadow DOM
o DOM tree only shows <div id="emptyHost"></div>
o Rendered HTML shows Not empty anymore!
o Markup in innerHTML is ugly
<div id="emptyHost"></div>
<script>
var host = document.querySelector('#emptyHost');
var root = host.createShadowRoot();
root.innerHTML = "<h1>Not empty anymore!</h4>";
</script>
Using Shadow DOM
• Shadow DOM with templates
<template id="commentTemplate">
<div>
<img src="">
<div class="comment-text"></div>
</div>
</template>
<script>
function addComment(imageUrl, text) { ... }
</script>
<div id="emptyHost"></div>
<script>
var host = document.querySelector('#emptyHost');
var root = host.createShadowRoot();
root.appendChild = addComment("http://lostinbrittany.org/avatar.png",
"This is a nice comment made by a nice guy");
</script>
• HTML elements are compositional
o You can put a button inside a table
• Shadow DOM elements need to be compositional
o Insertion points in the Shadow DOM
Separate content from presentation
<template id="commentTemplate">
<div class="comment">
<img src="">
<div class="comment-text">
<content></content>
</div>
</div>
<style> ... </style>
</template>
...
<div id="aComment">
<h1>Ceci est un commentaire</h1>
</div>
Result :
<div id="aComment">
#documentFragment
<div class="comment">
<img src="">
<div class="comment-text">
<h1>Ceci est un
commentaire</h1>
</div>
</div>
<style> ... </style>
</div>
• More granularity can be added :
Separate content from presentation
<template id="commentTemplate">
<div class="comment">
<div class="comment-img">
<content select="img"></content>
</div>
<div class="comment-author">
<content select="div"></content>
</div>
<div class="comment-text">
<content select="text"></content>
</div>
</div>
<style> ... </style>
</template>
...
<div id="aComment">
<div class="author">Horacio</div>
<img src="http://example.com/avatar.png"/>
<div class="text">Ceci est un commentaire</div>
</div>
Result :
<div id="aComment">
#documentFragment
<div class="comment">
<div class="comment-img">
<img src="">
</div>
<div class="comment-author">
Horacio
</div>
<div class="comment-text">
Ceci est un commentaire
</div>
</div>
<style> ... </style>
</div>
Why does it work for author?
Invitation model, first match
Shadow DOM et CSS
• CSS defined in the Shadow DOM remains there
• Outside styles don't affect Shadowed content
<h1>This is a title</h1>
<div id="widget">
#document-fragment
<style>
div {border: solid 1px red;}
h1 {color: blue;}
</style>
<h1>And this is widget title</h1>
<div>Widget content here</div>
</div>
This is a title
And this is widget title
Widget content here
Shadow DOM et CSS
• Styling the host element : @host
<template id="template">
<style>
@host {
button {
border-radius: 5px;
}
}
</style>
<content></content>
</template>
<button id="host">My Button</button>
<script>
var host = document.querySelector('#host');
var root = host.createShadowRoot();
var shadowContent =
document.querySelector("#template").content.cloneNode(true);
root.appendChild = shadowContent;
</script>
My Button
Shadow DOM et CSS
• Inheriting and resetting styles in Shadow DOM content
o
.resetStyleInheritance

false (default) : properties are inherited

true : inheritable properties are reset to initial
o
.applyAuthorStyles

false (default) : author styles aren't applied

true: author styles bleed into the content
• widget theming
Shadow DOM et CSS
• Inheritance Cheat Sheet
Image : HTML5 Rocks' Web Components 201
Custom Elements
Elemental mayhem !
Custom elements : the <element> tag
• An element encloses template, lifecycle and behaviour
o Templates done with <template> tag
<element name="tick-tock-clock">
<template>
<style>
// Here the nice style of our nice clock
</style>
<span id="hh"></span>
<span id="sep">:</span>
<span id="mm"></span>
</template>
</element>
• Livecycle defined with 3 callbacks
o readyCallback: called after the element is created
o insertedCallback: called after the element is inserted into a document
o removedCallback: called after the element is removed
Custom elements : the <element> tag
<element name="tick-tock-clock">
<template> ... </template>
<script>
function aFunctionToStartTheClock() { ... }
function aFunctionToStopTheClock() { ... }
({
readyCallback: function () {
this._root = this.createShadowRoot();
this._root.appendChild(template.content.cloneNode());
if (this.parentElement) {
start.call(this);
}
},
insertedCallback: aFunctionToStartTheClock(),
removedCallback: aFunctionToStopTheClock()
});
</script>
</element>
• If an element extends another, instantiation with is keyword
Custom elements : instantiation
<element extends="button" name="fancy-button"> ... </element>
<button is="fancy-button">Do something fancy</button>
• If an element doesn't extends, its name becomes a custom tag
<element name="myShinyElement"> ... </element>
<myShinyElement>Do something fancy</myShinyElement>
Imports
Because you hate long files
• Custom elements can be loaded from external files
o
Using the link tag:
o Only <decorator> and <element> are interpreted
o The DOM of this document is available to script
o Documents are retrieved according to cross-origin policies
Polymer
<link rel="import" href="goodies.html">
Other interesting bits
Even if outside Web Components
• Provide developers a way to react to changes in DOM
Mutation Observers
// select the target node
var target = document.querySelector('#some-id');
// create an observer instance
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
console.log(mutation.type);
});
});
// configuration of the observer:
var config = { attributes: true, childList: true, characterData: true };
// pass in the target node, as well as the observer options
observer.observe(target, config);
// later, you can stop observing
observer.disconnect();
• Replace MutationEvents
o Increased performance
• Observe and notify of mutations to JavaScript objects
o Properties added, updated, deleted or reconfigurated
Object.observe
function log( change ) {
console.log( "What Changed? ", change.name );
console.log( "How did it change? ", change.type );
console.log( "What is the present value? ", change.object[ change.name ] );
}
var o = {};
// Specify |o| as an observable object
Object.observe(o, function( changes ) {
changes.forEach( log );
});
o.who = "Rick";
/*
What Changed? who
How did it change? new
What is the present value? Rick
*/
• Part of ECMA 6
Can I use?
If not, why are you telling us all this sh*t?
Are we componetized yet
• New Google project
o Introduced in Google I/O 2013
o New type of library for the web
o Built on top of Web Components
o Designed to leverage the evolving web platform
• What does it means ?
o Polymer is comprised of two efforts :
o A core platform to give Web Component capabilities to modern browsers
 Shims for all modern browsers
 Shared with Mozilla x-tag project
o A next-generation web framework built upon this core platform
 Called the Polymer.
Polymer
Polymer
• Principes:
o Everything is a component
 Encapsulation is needed for a component oriented application
o Extreme pragmatism
 Boilerplate is bad
 Anything repetitive should be re-factored into a component
• Handled by Polymer itself or
• Added into the browser platform itself
o Salt to taste
 Use as much or as little of the framework as you wish.
• You want polyfills only : load polymer-all/platform/platform.js
• You want extra bits : load polymer-all/polymer/polymer.js
o Polymer elements
Polymer
• Platform technologies are already functional
o You can use it to add templates, shadow DOM, custom elements and
imports to your app
• Lots of examples in the site
Polymer
• X-Tag is a small JavaScript library
o
created and supported by Mozilla
o
that brings Web Components capabilities
o
to all modern browsers.
• Polymer vs X-tags ?
o
Different features and approaches
o
Mozilla and Google are collaborating
o
building the shared polyfills platform
X-Tags
• AngularJS directives allow to create custom elements
o Similar but different to Web Components
AngularJS
angular.module('ng').directive('testElem', function () {
return {
restrict: 'A',
template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj
in arr">{{obj}}</p></div>',
//templateUrl: '/partials/template.html',
link: function (scope, iterStartElement, attr) {
$(".mydirectiveclass").css({'background-color' : 'yellow'});
scope.arr = ["mikhail", "is", "the", "best"];
}
};
});
o
First line declares the directive testElem
o
The element name will be test-elem
• AngularJS directives allow to create custom elements
o Similar but different to Web Components
AngularJS
angular.module('ng').directive('testElem', function () {
return {
restrict: 'A',
template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj
in arr">{{obj}}</p></div>',
//templateUrl: '/partials/template.html',
link: function (scope, iterStartElement, attr) {
$(".mydirectiveclass").css({'background-color' : 'yellow'});
scope.arr = ["mikhail", "is", "the", "best"];
}
};
});
o
Restrict defines the element scope :
o
E: a DOM element with a custom name, <my-directive>
o
A: a DOM element with custom attribute, <div my-directive="exp">
o
C: invocation via a class, <div class="my-directive: exp">
o
M: invocation via a comment,
o
<!-- directive: my-directive exp -->
• AngularJS directives allow to create custom elements
o Similar but different to Web Components
AngularJS
angular.module('ng').directive('testElem', function () {
return {
restrict: 'A',
template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj
in arr">{{obj}}</p></div>',
//templateUrl: '/partials/template.html',
link: function (scope, iterStartElement, attr) {
$(".mydirectiveclass").css({'background-color' : 'yellow'});
scope.arr = ["mikhail", "is", "the", "best"];
}
};
});
o
template: HTML string of that the element will be replaced by
o templateUrl: (optional) the template HTML inside another file
o link: the linking function
o After the template has been loaded, this function is called
 to establish the AngularJS scope
 any last-minute effects
• jQuery animation or other logic.
• Using the custom elements
AngularJS
<!doctype html>
<html>
<head>
<title>Directive Test</title>
<script type="text/javascript" src="jquery.min.js" ></script>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="mydirectives.js"></script>
</head>
<body ng-app>
<div test-elem></div>
</body>
</html>
Conclusion
That's all folks!
You want to know more?
• W3C's Introduction to Web Components
• HTML5 Rocks' Shadow Dom 101
• HTML5 Rocks' Shadow Dom 201: CSS
• Polymer & X-Tags
• MutationObserver & Object.observe
Thank you !

Mais conteúdo relacionado

Mais procurados

MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgetsBehnam Taraghi
 
Using Components to Build Native-Quality HTML5 Apps
Using Components to Build Native-Quality HTML5 AppsUsing Components to Build Native-Quality HTML5 Apps
Using Components to Build Native-Quality HTML5 Appsgraynorton
 
HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!Iker Jamardo
 
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0James Thomas
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5Alkacon Software GmbH & Co. KG
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xWong Hoi Sing Edison
 
BOF-5110 Extending the Groovy SwingBuilder
BOF-5110 Extending the Groovy SwingBuilderBOF-5110 Extending the Groovy SwingBuilder
BOF-5110 Extending the Groovy SwingBuilderDanno Ferrin
 
Guia de Sobrevivência JS no mundo Open Source
Guia de Sobrevivência JS no mundo Open SourceGuia de Sobrevivência JS no mundo Open Source
Guia de Sobrevivência JS no mundo Open SourceLeonardo Balter
 
Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007Netvibes
 
Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuningAOE
 
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Endava
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialPatrick Chanezon
 
Drupal core indeas - Andy Postnikov
Drupal core indeas  - Andy PostnikovDrupal core indeas  - Andy Postnikov
Drupal core indeas - Andy PostnikovDrupalCamp Kyiv
 
Разработка приложений в Android studio
Разработка приложений в Android studioРазработка приложений в Android studio
Разработка приложений в Android studioDev2Dev
 

Mais procurados (19)

MVC pattern for widgets
MVC pattern for widgetsMVC pattern for widgets
MVC pattern for widgets
 
Mojito
MojitoMojito
Mojito
 
Using Components to Build Native-Quality HTML5 Apps
Using Components to Build Native-Quality HTML5 AppsUsing Components to Build Native-Quality HTML5 Apps
Using Components to Build Native-Quality HTML5 Apps
 
HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!
 
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 
BOF-5110 Extending the Groovy SwingBuilder
BOF-5110 Extending the Groovy SwingBuilderBOF-5110 Extending the Groovy SwingBuilder
BOF-5110 Extending the Groovy SwingBuilder
 
Zero To Dojo
Zero To DojoZero To Dojo
Zero To Dojo
 
Guia de Sobrevivência JS no mundo Open Source
Guia de Sobrevivência JS no mundo Open SourceGuia de Sobrevivência JS no mundo Open Source
Guia de Sobrevivência JS no mundo Open Source
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007Netvibes UWA workshop at ParisWeb 2007
Netvibes UWA workshop at ParisWeb 2007
 
Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuning
 
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
Angularjs vs Dojo toolkit | SuperSpeaker@CodeCamp Iasi 2014
 
Vanjs backbone-powerpoint
Vanjs backbone-powerpointVanjs backbone-powerpoint
Vanjs backbone-powerpoint
 
Google Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocialGoogle Devfest Singapore - OpenSocial
Google Devfest Singapore - OpenSocial
 
Drupal core indeas - Andy Postnikov
Drupal core indeas  - Andy PostnikovDrupal core indeas  - Andy Postnikov
Drupal core indeas - Andy Postnikov
 
Rails + Webpack
Rails + WebpackRails + Webpack
Rails + Webpack
 
Разработка приложений в Android studio
Разработка приложений в Android studioРазработка приложений в Android studio
Разработка приложений в Android studio
 

Semelhante a BreizhBeans - Web components

Web components
Web componentsWeb components
Web componentsGil Fink
 
Polymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaPolymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaJohn Riviello
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerFITC
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsanCodecamp Romania
 
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayWorld 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayBryan Brandow
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web componentsMarc Bächinger
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!Codemotion
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedGil Fink
 
Polytechnic 1.0 Granada
Polytechnic 1.0 GranadaPolytechnic 1.0 Granada
Polytechnic 1.0 GranadaIsrael Blancas
 
Web Components - The Future is Here
Web Components - The Future is HereWeb Components - The Future is Here
Web Components - The Future is HereGil Fink
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsGil Fink
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xPatrickHillert
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xinovex GmbH
 
Angular View Encapsulation
Angular View EncapsulationAngular View Encapsulation
Angular View EncapsulationJennifer Estrada
 
gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjsgdgvietnam
 
Polymer
Polymer Polymer
Polymer jskvara
 
Font End Development + Automation with Django
Font End Development + Automation with DjangoFont End Development + Automation with Django
Font End Development + Automation with DjangoEvan Reiser
 

Semelhante a BreizhBeans - Web components (20)

Web components
Web componentsWeb components
Web components
 
Polymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest FloridaPolymer-Powered Design Systems - DevFest Florida
Polymer-Powered Design Systems - DevFest Florida
 
Reaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and PolymerReaching for the Future with Web Components and Polymer
Reaching for the Future with Web Components and Polymer
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
 
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker WayWorld 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
World 2013 - Pushing MicroStrategy to the Limit, The Hacker Way
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web components
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Polymer - Lego for the web!
Polymer - Lego for the web!Polymer - Lego for the web!
Polymer - Lego for the web!
 
Web components
Web componentsWeb components
Web components
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
 
Polytechnic 1.0 Granada
Polytechnic 1.0 GranadaPolytechnic 1.0 Granada
Polytechnic 1.0 Granada
 
Web Components - The Future is Here
Web Components - The Future is HereWeb Components - The Future is Here
Web Components - The Future is Here
 
Build Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponentsBuild Reusable Web Components using HTML5 Web cComponents
Build Reusable Web Components using HTML5 Web cComponents
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Angular View Encapsulation
Angular View EncapsulationAngular View Encapsulation
Angular View Encapsulation
 
Hardcode SEO
Hardcode SEOHardcode SEO
Hardcode SEO
 
gDayX - Advanced angularjs
gDayX - Advanced angularjsgDayX - Advanced angularjs
gDayX - Advanced angularjs
 
Polymer
Polymer Polymer
Polymer
 
Font End Development + Automation with Django
Font End Development + Automation with DjangoFont End Development + Automation with Django
Font End Development + Automation with Django
 

Mais de Horacio Gonzalez

Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27
Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27
Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27Horacio Gonzalez
 
But there is no web component for that - Web Components Remote Conference - 2...
But there is no web component for that - Web Components Remote Conference - 2...But there is no web component for that - Web Components Remote Conference - 2...
But there is no web component for that - Web Components Remote Conference - 2...Horacio Gonzalez
 
Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27
 Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27 Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27
Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27Horacio Gonzalez
 
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...Horacio Gonzalez
 
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSHoracio Gonzalez
 
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09Horacio Gonzalez
 
Mixing Web Components - Best of Web Paris - 2016 06-09
Mixing Web Components - Best of Web Paris - 2016 06-09Mixing Web Components - Best of Web Paris - 2016 06-09
Mixing Web Components - Best of Web Paris - 2016 06-09Horacio Gonzalez
 
Polymer in the real life - Devoxx France - 2016 04-20
Polymer in the real life - Devoxx France - 2016 04-20Polymer in the real life - Devoxx France - 2016 04-20
Polymer in the real life - Devoxx France - 2016 04-20Horacio Gonzalez
 
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24 Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24 Horacio Gonzalez
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptHoracio Gonzalez
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...Horacio Gonzalez
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLHoracio Gonzalez
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JS
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JSENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JS
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JSHoracio Gonzalez
 
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQLENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQLHoracio Gonzalez
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...Horacio Gonzalez
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSHoracio Gonzalez
 
Mixing Web Components - Paris Web Components - 2015 09-16
Mixing Web Components - Paris Web Components - 2015 09-16 Mixing Web Components - Paris Web Components - 2015 09-16
Mixing Web Components - Paris Web Components - 2015 09-16 Horacio Gonzalez
 
Devoxx France - Web Components, Polymer et Material Design
Devoxx France -  Web Components, Polymer et Material DesignDevoxx France -  Web Components, Polymer et Material Design
Devoxx France - Web Components, Polymer et Material DesignHoracio Gonzalez
 
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...Horacio Gonzalez
 
2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec PolymerHoracio Gonzalez
 

Mais de Horacio Gonzalez (20)

Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27
Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27
Il n'y a pas que Polymer dans la vie… - RennesJS - 2017-06-27
 
But there is no web component for that - Web Components Remote Conference - 2...
But there is no web component for that - Web Components Remote Conference - 2...But there is no web component for that - Web Components Remote Conference - 2...
But there is no web component for that - Web Components Remote Conference - 2...
 
Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27
 Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27 Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27
Mixité dans le monde des WebComponents - DevFest Toulouse - 2017-09-27
 
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 2/3 - HTML5, CSS3, Twitter B...
 
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2016 2017 - CAI Web S02E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
 
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09
Battle of Frameworks: Polymer - Meetup Paris Web Components - 2016-09
 
Mixing Web Components - Best of Web Paris - 2016 06-09
Mixing Web Components - Best of Web Paris - 2016 06-09Mixing Web Components - Best of Web Paris - 2016 06-09
Mixing Web Components - Best of Web Paris - 2016 06-09
 
Polymer in the real life - Devoxx France - 2016 04-20
Polymer in the real life - Devoxx France - 2016 04-20Polymer in the real life - Devoxx France - 2016 04-20
Polymer in the real life - Devoxx France - 2016 04-20
 
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24 Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24
Warp10: collect, store and manipulate sensor data - BreizhCamp - 2016 03-24
 
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScriptENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
ENIB 2015 2016 - CAI Web S02E03- Forge JS 1/4 - La forge JavaScript
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 2/3 - HTML5 / CSS3 / Twitter...
 
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQLENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
ENIB 2015 2016 - CAI Web S02E03 - Forge JS 2/4 - MongoDB and NoSQL
 
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JS
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JSENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JS
ENIB 2015 2016 - CAI Web S02E01- Côté Navigateur 1/3 - HTTP, HTML, CSS JS
 
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQLENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
ENIB 2015-2016 - CAI Web - S01E01- MongoDB and NoSQL
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 2/3 - HTML5, CSS3, Twitte...
 
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JSENIB 2015-2016 - CAI Web -  S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
ENIB 2015-2016 - CAI Web - S01E01- Côté navigateur 1/3 - HTTP, HTML, CSS, JS
 
Mixing Web Components - Paris Web Components - 2015 09-16
Mixing Web Components - Paris Web Components - 2015 09-16 Mixing Web Components - Paris Web Components - 2015 09-16
Mixing Web Components - Paris Web Components - 2015 09-16
 
Devoxx France - Web Components, Polymer et Material Design
Devoxx France -  Web Components, Polymer et Material DesignDevoxx France -  Web Components, Polymer et Material Design
Devoxx France - Web Components, Polymer et Material Design
 
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...
Steven Le Roux - Kafka et Storm au service de la lutte antiDDoS à OVH - Soiré...
 
2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer
 

Último

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 

Último (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 

BreizhBeans - Web components

  • 2. Horacio Gonzalez Spaniard lost in Brittany, Java developer, dreamer and all-around geek • Senior Software Engineer at Crédit Mutuel Arkea o Currently... • Leader of the FinistJUG and the BreizhBeans community http://lostinbrittany.org/ +Horacio.Gonzalez @LostInBrittany
  • 3. BreizhBeans Developer community at the far end of French Brittany http://breizhbeans.org/ @BreizhBeans
  • 4. Introduction Because I love to tell old stories
  • 5. At the beginning we had the thick client • Widget : basic building blocks of your UI o Encapsultation o Reutilisation In thick client you create your UI by widget assembling Image : Wikipedia
  • 6. Web development was unlike thick-client • HTML/CSS/JS didn't support widgets o Page where the building blocks Web apps were page oriented Image : IBM
  • 7. GWT gave back widgets to web devs • GWT uses a thick-client-like development paradigm o Widgets, properties, events GWT web apps are widget oriented : Single-page apps Image : GWT Mail sample app
  • 8. Single-page apps are a current trend • From UX POV single-page apps are richer o But making them without widgets is painful HTML/CSS/JS needed a widget standard Image : Ken Schultz comedy juggler
  • 9. Web Components Reinventing the wheel... and this time making it round
  • 10. Web Components : a W3C standard • Web Components standard is being worked at W3C o We all know what this means o Clue : HTML5 They will work for years, bickering and fighting Browsers and devs will use the WiP document
  • 11. Example : the Google+ button • If you want to place a Google+ button in your page <!-- Place this tag where you want the +1 button to render. --> <div class="g-plusone" data-annotation="inline" data-width="300"></div> <!-- Place this tag after the last +1 button tag. --> <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script>
  • 12. Example : the Google+ button • And what I would like is simple <g:plusone></g:plusone>
  • 13. Example : the Google+ button • To be fair, Google already makes it simpler <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script> ... <g:plusone></g:plusone> • They create directives with JS to emulate components o AngularJS approach o Respecting the spirit of the future standard o Working in current browsers
  • 14. Another example : the RIB • If you're French, you know what a RIB is o A banking account identification number • To show a RIB in HTML: o All styling, all surface control must be done elsewhere by CSS and JS • What I would like o A semantic tag o With encapsulated styling and surface controlling <div class="rib">58496 87451 00014500269 74</div> <x-rib banque=58496 guichet=87451 compte=00014500269 cle=74> </x-rib>
  • 15. But we already can do that! • In most modern frameworks we can already do components, in a way or another o And all those ways are different! o Using different JavaScript libraries o Almost no component sharing between frameworks • W3C's works aim to make a standard way o Supported natively by all browsers o Allowing for component reuse
  • 16. The 5 pillars of the Web Components • Templates • Shadow DOM • Custom Elements • Decorators • Imports
  • 18. Templates • A reusable model o Contains markup intended to be used later <template id="commentTemplate"> <div> <img src=""> <div class="comment-text"></div> </div> </template>
  • 19. Templates before <template> • How did we do templating before o Using display:none or hidden o Putting it inside a script o Type unknown to browser, it isn't interpretated o Markup easily recovered via .innerHTML and reused o Approach used by many template engines <div id="commentTemplate" class="comment" hidden> <img src=""> <div class="comment-text"></div> </div> <script id="commentTemplate" type="text/template"> <div class="comment"> <img src=""> <div class="comment-text"></div> </div> </script>
  • 20. • Uniformising those approach with a new tag <template id="commentTemplate"> <div> <img src=""> <div class="comment-text"></div> </div> </template> • Content inside the tag is parsed but not interpreted o HTML not shown o Resources are not loaded o Scripts not executed The <template> tag
  • 21. Template instantiation • Using JavaScript <template id="commentTemplate"> <div> <img src=""> <div class="comment-text"></div> </div> </template> <script> function addComment(imageUrl, text) { var t = document.querySelector("#commentTemplate"); var comment = t.content.cloneNode(true); // Populate content. comment.querySelector('img').src = imageUrl; comment.querySelector('.comment-text').textContent = text; document.body.appendChild(comment); } </script>
  • 22. Shadow DOM Join the shadowy side, young padawan Image: Springfield Punx
  • 23. Encapsulation • Each component should have o Public interface o Private inner code • When using a component o You manipulate the interface only o You don't need to know anything about inner code o No conflict between inner code and outside code
  • 24. Encapsulation before Shadow DOM • Only a way : <innerFrame> Image : Star Trek the Next Generation
  • 25. Browsers already use encapsulation • Considerer this simple slider o How is is done inside? o With HTML, CSS and JS! o It has a movable element, I can recover it's position o Why cannot see it in DOM tree? • Browsers hide DOM sub-trees for standard components o They have a public interface and hidden inner code • That's Shadow DOM! <input id="foo" type="range"> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> </video> Image: Springfield Punx
  • 26. My name is DOM, Shadow DOM • Shadow DOM: ability of the browser to o Include a DOM subtree into the rendering o But not into the main document DOM tree • In Chome you can see the Shadow DOM o By activating the option in Inspector
  • 27. Looking into the Shadow • For the slider :
  • 28. Shadow DOM is already here • Browser use it everyday... o For their inner needs o Not exposed to developers • Web Components makes Shadow DOM available o You can use it for your own components Image: Springfield Punx
  • 29. Using Shadow DOM • There is a host element o A normal element in DOM tree • A shadow root is associated to the host o Using the createShadowRoot method o The shadow root is the root of the hidden DOM tree Image: W3C
  • 30. Using Shadow DOM • Quick and dirty Shadow DOM o DOM tree only shows <div id="emptyHost"></div> o Rendered HTML shows Not empty anymore! o Markup in innerHTML is ugly <div id="emptyHost"></div> <script> var host = document.querySelector('#emptyHost'); var root = host.createShadowRoot(); root.innerHTML = "<h1>Not empty anymore!</h4>"; </script>
  • 31. Using Shadow DOM • Shadow DOM with templates <template id="commentTemplate"> <div> <img src=""> <div class="comment-text"></div> </div> </template> <script> function addComment(imageUrl, text) { ... } </script> <div id="emptyHost"></div> <script> var host = document.querySelector('#emptyHost'); var root = host.createShadowRoot(); root.appendChild = addComment("http://lostinbrittany.org/avatar.png", "This is a nice comment made by a nice guy"); </script>
  • 32. • HTML elements are compositional o You can put a button inside a table • Shadow DOM elements need to be compositional o Insertion points in the Shadow DOM Separate content from presentation <template id="commentTemplate"> <div class="comment"> <img src=""> <div class="comment-text"> <content></content> </div> </div> <style> ... </style> </template> ... <div id="aComment"> <h1>Ceci est un commentaire</h1> </div> Result : <div id="aComment"> #documentFragment <div class="comment"> <img src=""> <div class="comment-text"> <h1>Ceci est un commentaire</h1> </div> </div> <style> ... </style> </div>
  • 33. • More granularity can be added : Separate content from presentation <template id="commentTemplate"> <div class="comment"> <div class="comment-img"> <content select="img"></content> </div> <div class="comment-author"> <content select="div"></content> </div> <div class="comment-text"> <content select="text"></content> </div> </div> <style> ... </style> </template> ... <div id="aComment"> <div class="author">Horacio</div> <img src="http://example.com/avatar.png"/> <div class="text">Ceci est un commentaire</div> </div> Result : <div id="aComment"> #documentFragment <div class="comment"> <div class="comment-img"> <img src=""> </div> <div class="comment-author"> Horacio </div> <div class="comment-text"> Ceci est un commentaire </div> </div> <style> ... </style> </div> Why does it work for author? Invitation model, first match
  • 34. Shadow DOM et CSS • CSS defined in the Shadow DOM remains there • Outside styles don't affect Shadowed content <h1>This is a title</h1> <div id="widget"> #document-fragment <style> div {border: solid 1px red;} h1 {color: blue;} </style> <h1>And this is widget title</h1> <div>Widget content here</div> </div> This is a title And this is widget title Widget content here
  • 35. Shadow DOM et CSS • Styling the host element : @host <template id="template"> <style> @host { button { border-radius: 5px; } } </style> <content></content> </template> <button id="host">My Button</button> <script> var host = document.querySelector('#host'); var root = host.createShadowRoot(); var shadowContent = document.querySelector("#template").content.cloneNode(true); root.appendChild = shadowContent; </script> My Button
  • 36. Shadow DOM et CSS • Inheriting and resetting styles in Shadow DOM content o .resetStyleInheritance  false (default) : properties are inherited  true : inheritable properties are reset to initial o .applyAuthorStyles  false (default) : author styles aren't applied  true: author styles bleed into the content • widget theming
  • 37. Shadow DOM et CSS • Inheritance Cheat Sheet Image : HTML5 Rocks' Web Components 201
  • 39. Custom elements : the <element> tag • An element encloses template, lifecycle and behaviour o Templates done with <template> tag <element name="tick-tock-clock"> <template> <style> // Here the nice style of our nice clock </style> <span id="hh"></span> <span id="sep">:</span> <span id="mm"></span> </template> </element>
  • 40. • Livecycle defined with 3 callbacks o readyCallback: called after the element is created o insertedCallback: called after the element is inserted into a document o removedCallback: called after the element is removed Custom elements : the <element> tag <element name="tick-tock-clock"> <template> ... </template> <script> function aFunctionToStartTheClock() { ... } function aFunctionToStopTheClock() { ... } ({ readyCallback: function () { this._root = this.createShadowRoot(); this._root.appendChild(template.content.cloneNode()); if (this.parentElement) { start.call(this); } }, insertedCallback: aFunctionToStartTheClock(), removedCallback: aFunctionToStopTheClock() }); </script> </element>
  • 41. • If an element extends another, instantiation with is keyword Custom elements : instantiation <element extends="button" name="fancy-button"> ... </element> <button is="fancy-button">Do something fancy</button> • If an element doesn't extends, its name becomes a custom tag <element name="myShinyElement"> ... </element> <myShinyElement>Do something fancy</myShinyElement>
  • 43. • Custom elements can be loaded from external files o Using the link tag: o Only <decorator> and <element> are interpreted o The DOM of this document is available to script o Documents are retrieved according to cross-origin policies Polymer <link rel="import" href="goodies.html">
  • 44. Other interesting bits Even if outside Web Components
  • 45. • Provide developers a way to react to changes in DOM Mutation Observers // select the target node var target = document.querySelector('#some-id'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { console.log(mutation.type); }); }); // configuration of the observer: var config = { attributes: true, childList: true, characterData: true }; // pass in the target node, as well as the observer options observer.observe(target, config); // later, you can stop observing observer.disconnect(); • Replace MutationEvents o Increased performance
  • 46. • Observe and notify of mutations to JavaScript objects o Properties added, updated, deleted or reconfigurated Object.observe function log( change ) { console.log( "What Changed? ", change.name ); console.log( "How did it change? ", change.type ); console.log( "What is the present value? ", change.object[ change.name ] ); } var o = {}; // Specify |o| as an observable object Object.observe(o, function( changes ) { changes.forEach( log ); }); o.who = "Rick"; /* What Changed? who How did it change? new What is the present value? Rick */ • Part of ECMA 6
  • 47. Can I use? If not, why are you telling us all this sh*t?
  • 49. • New Google project o Introduced in Google I/O 2013 o New type of library for the web o Built on top of Web Components o Designed to leverage the evolving web platform • What does it means ? o Polymer is comprised of two efforts : o A core platform to give Web Component capabilities to modern browsers  Shims for all modern browsers  Shared with Mozilla x-tag project o A next-generation web framework built upon this core platform  Called the Polymer. Polymer
  • 51. • Principes: o Everything is a component  Encapsulation is needed for a component oriented application o Extreme pragmatism  Boilerplate is bad  Anything repetitive should be re-factored into a component • Handled by Polymer itself or • Added into the browser platform itself o Salt to taste  Use as much or as little of the framework as you wish. • You want polyfills only : load polymer-all/platform/platform.js • You want extra bits : load polymer-all/polymer/polymer.js o Polymer elements Polymer
  • 52. • Platform technologies are already functional o You can use it to add templates, shadow DOM, custom elements and imports to your app • Lots of examples in the site Polymer
  • 53. • X-Tag is a small JavaScript library o created and supported by Mozilla o that brings Web Components capabilities o to all modern browsers. • Polymer vs X-tags ? o Different features and approaches o Mozilla and Google are collaborating o building the shared polyfills platform X-Tags
  • 54. • AngularJS directives allow to create custom elements o Similar but different to Web Components AngularJS angular.module('ng').directive('testElem', function () { return { restrict: 'A', template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj in arr">{{obj}}</p></div>', //templateUrl: '/partials/template.html', link: function (scope, iterStartElement, attr) { $(".mydirectiveclass").css({'background-color' : 'yellow'}); scope.arr = ["mikhail", "is", "the", "best"]; } }; }); o First line declares the directive testElem o The element name will be test-elem
  • 55. • AngularJS directives allow to create custom elements o Similar but different to Web Components AngularJS angular.module('ng').directive('testElem', function () { return { restrict: 'A', template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj in arr">{{obj}}</p></div>', //templateUrl: '/partials/template.html', link: function (scope, iterStartElement, attr) { $(".mydirectiveclass").css({'background-color' : 'yellow'}); scope.arr = ["mikhail", "is", "the", "best"]; } }; }); o Restrict defines the element scope : o E: a DOM element with a custom name, <my-directive> o A: a DOM element with custom attribute, <div my-directive="exp"> o C: invocation via a class, <div class="my-directive: exp"> o M: invocation via a comment, o <!-- directive: my-directive exp -->
  • 56. • AngularJS directives allow to create custom elements o Similar but different to Web Components AngularJS angular.module('ng').directive('testElem', function () { return { restrict: 'A', template: '<div class="mydirectiveclass"><h1>hello...</h1><p ng-repeat="obj in arr">{{obj}}</p></div>', //templateUrl: '/partials/template.html', link: function (scope, iterStartElement, attr) { $(".mydirectiveclass").css({'background-color' : 'yellow'}); scope.arr = ["mikhail", "is", "the", "best"]; } }; }); o template: HTML string of that the element will be replaced by o templateUrl: (optional) the template HTML inside another file o link: the linking function o After the template has been loaded, this function is called  to establish the AngularJS scope  any last-minute effects • jQuery animation or other logic.
  • 57. • Using the custom elements AngularJS <!doctype html> <html> <head> <title>Directive Test</title> <script type="text/javascript" src="jquery.min.js" ></script> <script type="text/javascript" src="angular.min.js"></script> <script type="text/javascript" src="mydirectives.js"></script> </head> <body ng-app> <div test-elem></div> </body> </html>
  • 59. You want to know more? • W3C's Introduction to Web Components • HTML5 Rocks' Shadow Dom 101 • HTML5 Rocks' Shadow Dom 201: CSS • Polymer & X-Tags • MutationObserver & Object.observe