7. The path to Web Components
WEB COMPONENTS
https://www.webcomponents.org/
“A set of web platform APIs that allow you to create new
custom, reusable, encapsulated HTML tags”
8. The path to Web Components
WEB COMPONENTS
https://www.webcomponents.org/
“A set of web platform APIs that allow you to create new
custom, reusable, encapsulated HTML tags”
Dev Tools
9. Polymer Library
A set of features for creating custom elements that work like
standard DOM elements
https://www.polymer-project.org/1.0/docs/devguide/feature-overview
10. “Anatomy” of a Polymer Component
<element-name greeting=”Hey!”>
</element-name>
Presentation
Behavior
11. Polymer Component Properties
● Property type
● Default value
● Property change observer: Calls a method whenever the property
value changes.
● Read-only status: Prevents accidental changes to the property value.
● Two-way data binding support: Fires an event whenever the
property value changes.
● Computed property: Dynamically calculates a value based on other
properties.
● Property reflection to attribute: Updates the corresponding attribute
value when the property value changes.
23. Available Elements @webcomponents.org (621)
PolymerElements (94)
● Material Design UI
● Flex layout
● Ajax
● Application Routing
● Google Components (e.g. Maps)
● etc
Vaadin (8)
● Upload
● Date Picker
● etc
24. Polymer 2.0 (Preview)
● Improved interoperability. Easier to use with
other libraries and frameworks. Shady DOM
separated out.
● Data system improvements. Easier to reason
about data propagation. Compatibility with Flux-like
approaches.
● More standard. Standard ES6 classes and the
standard custom elements v1 methods for defining
elements.
25. Polymer App Toolbox
A collection of components, tools and templates for building
Progressive Web Apps with Polymer
https://www.polymer-project.org/1.0/toolbox/
27. Polymer App Toolbox Features
● Component-based architecture using Polymer and
web components.
● Responsive design using the app layout components.
● Modular routing using the <app-route> elements.
● Localization with <app-localize-behavior>.
● Turnkey support for local storage with app storage
elements.
● Offline caching as a progressive enhancement, using
service workers.
● Build tooling to support serving your app multiple
ways:
○ unbundled for delivery over HTTP/2 with server
push
○ bundled for delivery over HTTP/1.
28. Polymer Toolchain
● Polymer CLI
○ Create an App Project
○ Run Tests
○ Local Web Server
○ Lint
○ Build (bundle)
○ Manage Dependencies (Bower)
● Gulp
○ All tools as separate modules