Location:
Progressive Web App Dev Summit, GDG Madrid 21-Jul-2016
Abstract:
Progressive Web Apps (PWA) have responsive layout, works offline, and can be on the home screen.
WebComponents allows build all those missing HTML pieces.
Polymer is a library for manipulating Web Components.
This presentation joins all those new technologies for creating the Future Apps.
5. - PWAs are being regarded with caution and confusion.
- Lots of backlash on the Internet about people not liking
that PWAs are this monolithic thing.
- PWAs are not only a Google thing, that rely on only a few
technologies, and are entirely new.
- Actually, most parts of what makes a PWA has been for
years.
Demystifying PWAs
6. - A web app that has a responsive layout, works offline,
and can be on the home screen of a device.
- More than a set of technologies or tools, PWAs are a
way of building web apps that transparently improve
UX across platforms, demographics, and use cases.
- You can implement individual enhancements in new
and existing web apps.
PWA basis
8. - Phonegap
○ Not need of a native container any more
○ HW access is now possible from browser
What is replacing/killing PWA?
- Native SDKs
○ The browser will be the only native App in devices
- O.S. of devices
○ Just the kernel and the browser ?
- App stores
○ New ways to make money ?
10. What are Web Components?
- It’s a NEW TAG for your browser
<my-ui-component>
- Based on Standard Specifications.
- Advantages:
○ No browser plugins just HTML
○ Easy to share: bower & npm
○ Framework agnostic
○ Multipurpose (UI, Func)
14. 1. HTML is the Component Model
2.HTML is a powerful Declarative Language
3. The Data flow is simply handled with
○ attributes <input value=”foo”>
○ properties myInput.value = “foo”
○ events myInput.addEventListener(‘foo’, bar)
Web Components is for missing HTML pieces.
DOM is the framework
17. Understanding Polymer
- Polymer is a library (not a framework) that allows us creating
and manipulating Web Components, even though some APIs are
missing in some browsers.
- Polymer makes easier and faster create anything from a button
to a complete application across desktop, mobile, and beyond.
- Polymer platform enables reusing & sharing UI components
between developers and frameworks.
○ Estable API, useful CLI
○ Reliable polyfill: lightweight shim
○ Full documented
Production ready platform: library, elements & tools
18. <!-- Create an element by composition -->
<dom-module id="input-echo">
<template>
<!-- Bidirectional data binding -->
<paper-input label="Type your name" value="{{name}}"></paper-input>
<!-- One way data binding and function execution -->
<div> Your [[field]] is: [[_format(name)]]</div>
<!-- Native elements do not have two-way binding support built in,
use Polymer's event-observer syntax instead -->
<label>Type your name: </label>
<input type="text" value="{{name::keyup}}">
</template>
</dom-module>
<!-- Register the element and define its data model -->
<script>
Polymer({
is: "input-echo",
properties: {field: String, name: String},
_format: function(name) {
return name.toUpperCase();
}
});
</script>
<!-- Use the element -->
<input-echo field="Surname"></input-element>
20. 1. Both are built on top of new Standards
○ PWA & polymer require new browsers
2.Both Focused on simplicity
○ Easy APIs, CLI tools, scaffolding
3.Framework agnostic.
○ Application Shell
4.Performance on mind
○ Reuse & Lightweight
Why Polymer in your PWAs
24. Motivations Traditional Dev of UI Components
- Verbose code
- Coupled to Frameworks
- Difficult to share
- No device in mind
25. Motivations Traditional Dev of UI Components
- Verbose code
- Coupled to Frameworks
- Difficult to share
- No device in mind
New Web Components Dev
- Standard specs
- Declarative lang
- Framework agnostic
- Multidevice & Production ready
- Active Development
- Google & Vaadin collaboration
- Huge community
26. Vaadin Elements
- Vaadin Core elements is an Apache 2.0 licensed set
of web components designed for business
applications
- Vaadin Charts A commercial Web Component for
high quality charts
27. Vaadin Tools
- polymer-themer (working on)
○ replace material design by custom themes (bootstrap, valo)
- angular2-polymer v1.0.0-beta2
○ directive factory bridge for using Polymer components in Angular
2 applications.
○ angular2-polymer-cli (soon)
- gwt-polymer-elements v1.2.3.0
○ Enables Polymer Elements to be used in GWT projects
○ gwt-polymer-api-generator v1.2.1
- vaadin-polymer-components (internal 0.0.1.alpha1)
○ vaadin-polymer-api-generator (internal)
Me considero Opensourcer, fanatico del mundo opensource, creo que mi perfil de github define bien lo que hago.
Empecé haciendo contribuciones a Linux, luego Apache, Jenkins, Google Web Toolkit,
Google cloud platform, PolymerElements
Finalmente Vaadin donde me pagan
Me considero Opensourcer, fanatico del mundo opensource, creo que mi perfil de github define bien lo que hago.
Empecé haciendo contribuciones a Linux, luego Apache, Jenkins, Google Web Toolkit,
Google cloud platform, PolymerElements
Finalmente Vaadin donde me pagan
To consume a WC in gwt we have to consider these points.
To consume a WC in gwt we have to consider these points.
To consume a WC in gwt we have to consider these points.
Qué significa realmente desarrollar con WC
Significa que no necesitamos un FW especifico
En resumen la manera de hacer apps con WC, es simplemente unir bloques como un LEGO
Pero un LEGO que te permite aislar y ocultar comportamientos
Entonces si es tan fácil usar los WC, porqué necesitamos Polymer
Hablar que es una libreria y direfencias con FW
Hablar que es mas fácil instanciar elementos y combinarlos, incluso hasta hacer una aplicacion
En resumen facilita que se puedan reusar y compartir
Las dos tecnologías se basan en modificar los navegarores para incluir API que le hagan la vida fácil al desarrollador
Custom elements, shadow etc..
Caching
Install
Intentan que sea lo mas simple posible, sin necesitar grandes bloques de código
Sin casarse con ningun FW
Y que tenga mucho rendimiento
Chrome + Polymer -> PWA
Tres bloques de especificaciones para poder hacer aplicaciones reales enterprise sin recurrir a native
Web components funcionaran muy pronto en TODOS los navegadores
Cambios a polymer, ES imports en lugar de HTML imports
Todos los bloques necesarios para Enterprise apps ya estan disponibles
Installable Apps todavia necesitan un tiempo,
Lo bueno es que todos los navegadores implementandolo ya tienen WC
Un framework para Apps enterprises, Equipos Focalizados en rendimiento, seguridad y velocidad de desarrollo.
Un framework para Apps enterprises, Equipos Focalizados en rendimiento, seguridad y velocidad de desarrollo.
Un framework para Apps enterprises, Equipos Focalizados en rendimiento, seguridad y velocidad de desarrollo.