Tech talk polymer

21
Intro to Web Components with

description

TechTalk about Polymer (http://polymer-project.org) arranged by Qiscus in Jogja Digital Valley

Transcript of Tech talk polymer

Page 1: Tech talk polymer

Intro to Web Components

with

Page 2: Tech talk polymer

About

Yanuar Waskito

Front End Developer at Qiscus

@jeguwaskito

waskito

Page 3: Tech talk polymer

Web Components

Page 4: Tech talk polymer

is

New set of web platform features that enable developers to build applications in a declarative, composable way

Page 5: Tech talk polymer

W3C● Web components are about:

– Templates– Custom Elements– Shadow DOM– Imports

Page 6: Tech talk polymer

Templates

Method for declaring inert DOM subtrees in HTML and manipulating them to instantiate document fragments with identical contents

Page 7: Tech talk polymer

Custom Elements

Method for enabling the author to define and use new types of DOM elements in a document

Page 8: Tech talk polymer

Shadow DOM

This specification describes a method of establishing and maintaining functional boundaries between DOM trees and how these trees interact with each other within a document, thus enabling better functional encapsulation within the DOM.

Page 9: Tech talk polymer

HTML Imports

HTML Imports are a way to include and reuse HTML documents in other HTML documents.

Page 10: Tech talk polymer
Page 11: Tech talk polymer

What we are talking about

● Is not a Framework● Polymer is a library

– uses the latest web technologies – lets you create custom HTML elements– polyfill of web components

Page 12: Tech talk polymer

Polymer is a library

Polymer is a way of bolting together web components to make robust web applications.

Page 13: Tech talk polymer

Core Elements

Set of visual and non-visual utility elements. They include elements for working with layout, user input, selection, and scaffolding apps

Page 14: Tech talk polymer

Paper Elements

Set of highly visual, highly interactive elements that include things like controls, layouts, hero transitions, and scrolling effects.

Page 15: Tech talk polymer

Designer

Page 16: Tech talk polymer

Pros● Modular Components● Consistent UX (Browser/Mobile)● Easy to Customize (via Designer)

Page 17: Tech talk polymer

Cons● Browser Compatibility :red● Not Beginner Friendly (JavaScript)● Still Experimental

Page 18: Tech talk polymer

What we are talking about

● Is not a Framework● Polymer is a library

– uses the latest web technologies – lets you create custom HTML elements– polyfill of web components

Page 19: Tech talk polymer

Demo

Page 20: Tech talk polymer

Install Polymer

● bower install --save Polymer/polymer● bower install --save Polymer/core-elements● bower install --save Polymer/paper-elements

Page 21: Tech talk polymer

References● http://www.w3.org/TR/components-intro/● http://www.polymer-project.org/● http://webcomponents.org/

Demo Code: https://github.com/waskito/techtalk-polymer-demo