JSFoo 2016
Ranadeep Bhuyan (in) & Ramit Garg
HTML 1, Javascript, HTTP/1
Insert Javascript into the browser
BODY H2 IMG UL LI
HTML 2 - INPUT FORM SELECT
HTML5 - VIDEO AUDIO DIALOG CANVAS
ASP, JSP, PHP
Server side rendering
W3C - Shadow DOM, Custom Elements, HTML Imports
HTTP/2
var input = document.CreateElement('input')
:input
input.selectionStart
:0
input.type = 'number'
"number"
input.selectionStart
Don’t know how to fall back to default in 1980s
However after 35 years?
Don’t know how to fall back to default in 1980s. However after 35 years?
Pain points:
Simplicity and 'Do one thing anf do it well'
An attempt to modularize the web
Chunks of markup that can be activated for later use
Let authors define their own elements
Encapsulates a DOM subtree
Standardize importing of different file types
Everything is an element
Everything is an element
Literally creating new HTML tags
Everything is an element
Literally creating new HTML tags
New paradigm to think about web development
Everything is an element
Literally creating new HTML tags
New paradigm to think about web development
Don’t reinvent the wheel
Everything is an element
Literally creating new HTML tags
New paradigm to think about web development
Don’t reinvent the wheel
Use/Extend premade Custom Elements
Everything is an element
Literally creating new HTML tags
New paradigm to think about web development
Don’t reinvent the wheel
Use/Extend premade Custom Elements
Simplify web app
$ bower install Polymer/core-toolbar $ bower install Polymer/core-icon-button
<head> <link rel="import" href="core-toolbar.html"> <link rel="import" href="core-icon-button.html"> </head>
<core-toolbar> <core-icon-button icon="menu"></core-icon-button> <span flex>Toolbar</span> <core-icon-button icon="refresh"></core-icon-button> <core-icon-button icon="add"></core-icon-button> </core-toolbar>
Layers of Polymer
Map
Node Bot