Book description
Although web components are still on the bleeding edge—barely supported in modern browsers—the technology is also moving extremely fast. This practical guide gets you up to speed on the concepts underlying W3C’s emerging standard and shows you how to build custom, reusable HTML5 Web Components.
Regardless of your experience with libraries such as jQuery and Polymer, this book teaches JavaScript developers the DOM manipulations these libraries perform. You’ll learn how to build a basic widget with vanilla JavaScript and then convert it into a web component that’s semantic, declarative, encapsulated, consumable, and maintainable. With custom components, the Web can finally fulfill its potential as a natively extensible application platform. This book gets you in at the right time.
- Understand core concepts (such as normal flow and positioning, and Z-index) for properly positioning, dragging, and resizing elements
- Explore UI concepts and patterns typically abstracted away by Dojo, jQuery UI, Kendo UI, and other libraries
- Dive into the W3C standard and convert your working widget example into a fully functioning web component
- Learn how to encapsulate, package, and deploy your web components with Google’s Polymer framework
Table of contents
- Preface
- 1. Introduction
- I. UI Core Concepts
- 2. Creating a Solid Foundation
- 3. Normal Flow and Positioning
- 4. Understanding and Managing z-index
- II. Building Our UI
- 5. Cloning Nodes
- 6. Constructing an Overlay
- 7. Making Elements Draggable
- 8. Resizing Elements
- 9. Completing the Dialog Widget
- III. Building HTML5 Web Components
- 10. Utilizing Templates
- 11. Working with the Shadow DOM
-
12. Creating Custom Elements
- Introducing Custom Elements
- Registering Custom Elements
- Extending Elements
- Defining Properties and Methods
- Resolving Custom Elements
- Hooking Into Custom Element Life Cycles
- Styling Custom Elements
- Utilizing Templates and the Shadow DOM with Custom Elements
- Converting the Dialog Component to a Custom Element
- Summary
- 13. Importing Code
- IV. Testing, Building, and Deploying Components with Polymer
- 14. Introducing Polymer
- 15. Porting Our Dialog to Polymer
- 16. Testing Web Components
- 17. Packaging and Publishing
- 18. Final Words
- Index
Product information
- Title: Developing Web Components
- Author(s):
- Release date: February 2015
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491905692
You might also like
book
Building Micro-Frontends
What's the answer to today's increasingly complex web applications? Micro-frontends. Inspired by the microservices model, this …
book
Deciphering Data Architectures
Data fabric, data lakehouse, and data mesh have recently appeared as viable alternatives to the modern …
book
Learning JavaScript Design Patterns, 2nd Edition
Do you want to write beautiful, structured, and maintainable JavaScript by applying modern design patterns to …
book
The Joy of JavaScript
The Joy of JavaScript introduces techniques that turn JavaScript programmers into JavaScript pros. You’ll work with …