desmistificando o polymer

61
Desmistificando o Polymer @obetomuniz

Upload: beto-muniz

Post on 31-Jul-2015

148 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Desmistificando o Polymer

Desmistificando o Polymer

@obetomuniz

Page 2: Desmistificando o Polymer

Beto Muniz@obetomuniz

Page 3: Desmistificando o Polymer

bit.ly/desmistificando-o-polymer

Page 4: Desmistificando o Polymer

helabs.com.br

Desmistificando o Polymer - Beto Muniz @obetomuniz

Page 5: Desmistificando o Polymer

minasdev.org

Page 6: Desmistificando o Polymer

webcomponents.org

Page 7: Desmistificando o Polymer
Page 8: Desmistificando o Polymer

Mas primeiro...

@obetomuniz

Page 9: Desmistificando o Polymer

@obetomuniz

Page 10: Desmistificando o Polymer

E qual é o cenário do web components atual?

@obetomuniz

Page 11: Desmistificando o Polymer

bit.ly/are-we-componentized-yet

@obetomuniz

Page 12: Desmistificando o Polymer
Page 13: Desmistificando o Polymer

Mas já tem gente usando....

@obetomuniz

Page 14: Desmistificando o Polymer

@obetomuniz

Page 15: Desmistificando o Polymer

@obetomuniz

Page 16: Desmistificando o Polymer
Page 17: Desmistificando o Polymer

P O L Y F I L L S

@obetomuniz

Page 18: Desmistificando o Polymer

polymer-project.org

@obetomuniz

Page 19: Desmistificando o Polymer

Mas o que é o Polymer?

@obetomuniz

Page 20: Desmistificando o Polymer

@obetomuniz

Page 21: Desmistificando o Polymer

@obetomuniz

Page 22: Desmistificando o Polymer

@obetomuniz

Page 23: Desmistificando o Polymer

@obetomuniz

Page 24: Desmistificando o Polymer
Page 25: Desmistificando o Polymer

Polymer Layers

@obetomuniz

Page 26: Desmistificando o Polymer

@obetomuniz

Page 27: Desmistificando o Polymer

"Everything as an element."

@obetomuniz

Page 28: Desmistificando o Polymer

Polymer elementsElementos não visuais

Estrutura <core-scaffold> <core-toolbar> <core-header-panel>

•••

Animação <core-animation> <core-animation-keyframe> <core-animation-prop>

Data <core-ajax> <core-xhr> <core-localstorage>

Outros <core-a11y-keys> <core-splitter> <core-animation>

Page 29: Desmistificando o Polymer

Polymer elementsElementos visuais

Paper Elements <paper-slider> <paper-tabs> <paper-spinner>

Core Elements <core-collapse> <core-splitter> <core-icon>

•••

Page 30: Desmistificando o Polymer

"Eliminate boilerplate."

@obetomuniz

Page 31: Desmistificando o Polymer

Criar um elemento

<polymer-element>

@obetomuniz

Page 32: Desmistificando o Polymer

<polymer-element extends="...">

Criar um elemento de um existente

@obetomuniz

Page 33: Desmistificando o Polymer

Utilizando-se de Two-way Data-binding (Mutation Observers)

<input id="input" value="{{foo}}">

@obetomuniz

Page 34: Desmistificando o Polymer

<button on-click="{{handClick}}">

Utilizando-se event handlers

@obetomuniz

Page 35: Desmistificando o Polymer

hello-world.html

@obetomuniz

Page 36: Desmistificando o Polymer

hello-world.html

Page 37: Desmistificando o Polymer

"Utilize the modern web platform(+)."

@obetomuniz

Page 38: Desmistificando o Polymer

Lifecycle callbacks

Insertion points

Estilo, Marcação e Comportamento isolados e distribuíveis

Animations

@obetomuniz

•••

Page 39: Desmistificando o Polymer
Page 40: Desmistificando o Polymer
Page 41: Desmistificando o Polymer

E o que o Polymer não é?

@obetomuniz

Page 42: Desmistificando o Polymer
Page 43: Desmistificando o Polymer

@obetomuniz

Page 44: Desmistificando o Polymer

@obetomuniz

Page 45: Desmistificando o Polymer

Apenas um Polyfill

@obetomuniz

Page 46: Desmistificando o Polymer

O Material Design

@obetomuniz

Page 47: Desmistificando o Polymer

Uma ferramenta do futuro

@obetomuniz

Page 48: Desmistificando o Polymer
Page 49: Desmistificando o Polymer

E porque usar o Polymer?

Produtivo Declarativo Performático

ComponentizadoAcessívelInteroperável

ReusávelManutenível Extensível

Page 50: Desmistificando o Polymer

Testavél

@obetomuniz

Page 51: Desmistificando o Polymer

6kb (gzipped)

@obetomuniz

Page 52: Desmistificando o Polymer
Page 53: Desmistificando o Polymer

E como aprender a usar?

@obetomuniz

Page 54: Desmistificando o Polymer

polymer-project.org

@obetomuniz

Page 55: Desmistificando o Polymer

webcomponents.org

@obetomuniz

Page 56: Desmistificando o Polymer

customelements.io

@obetomuniz

Page 57: Desmistificando o Polymer

@ebidel @zenorocha @addyosmani

@sindresorhus

@rob_dodson @PascalPrecht @eduardolundgren

@passy

•••

Page 58: Desmistificando o Polymer

Vamos componentizar!

@obetomuniz

Page 59: Desmistificando o Polymer
Page 60: Desmistificando o Polymer

DEMOS

@obetomuniz

DEMOgithub.com/obetomuniz/polymer-demos

Page 61: Desmistificando o Polymer

Beto Muniz

@obetomuniz

betomuniz.com

bit.ly/desmistificando-o-polymer

Muito Obrigado!