Start developing single-page applications (SPAs) with modern architecture. This book shows you how to create, design, and publish native web components, ultimately allowing you to piece together those elements in a modern JavaScript framework.
Building Native Web Components dives right in and gets you started building your first web component. You'll be introduced to native web component design systems and frameworks and discuss component-driven development to understand its importance in large-scale companies. You'll then move on to building web components using templates and APIs, and custom event lifecycles. Techniques and best practices for moving data, customizing, and distributing components are also covered. Throughout, you'll develop a foundation to start using Polymer, Vue.js, and Firebase in your day-to-day work.
Confidently apply modern patterns and develop workflows to build agnostic software pieces that can be reused in SPAs. Building Native Web Components is your guide to developing small and autonomous web components that are focused, independent, reusable, testable, and works with all JavaScript frameworks, modern browsers, and libraries.
You will:
- Incorporate component-driven development (CDD) and design systems into your workflow
- Build apps with reusable UI components that are agnostic to JavaScript frameworks
- Utilize Polymer and Vue.js in your day-to-day work
- Publish your UI components in npm (Node Package Manager)
Autorentext
Carlos Rojas is an engineer with over 10 years of experience building digital products. He is focused on front-end technologies (HTML, CSS, JS, Angular, React, Polymer, and Vue.js) and edge web technologies such as web components, WebXR and Progressive Web Apps. He also has experience working with Fortune 500 companies and fast-changing business environments such as startups.
He enjoys sharing knowledge with talks in meetups, videos on YouTube, other books published by Apress, and his personal blog https://medium.com/@carlosrojas_o, helping startups and companies to run workflows to make excellent digital products. As such, his books aim to convey the love he has for the construction of scalable, high-quality products.
Inhalt
- What is a web component?
- History of the component
- Browser support for web components
- Core technologies
- Custom elements
- Summary
- Getting started
- CDD
- Micro frameworks
- Design systems
- Development
- Summary
- Introducing HTML templates
- Creating and using templates
- Content slot API
- Named slots
- Creating a web component
- Summary
- Introducing communication between components
- Component properties
- Component events
- Communicating a web component
- Component custom attributes
- Summary
- Introducing web components lifecycle
- JavaScript class constructor and connect callback
- Disconnected callback
- Attribute changed callback
- Adopted callback
- Summary
- Introducing shadow DOM
- Global styles
- CSS encapsulation
- CSS custom properties
- Dynamic CSS custom properties
- Theming Web Components
- Summary
- Component Data Flow
- Note List
- Note Detail
- Summary
- Publishing with npm
- Polyfills
- Browser Support
- Installing Webpack and Babel
- Webpack
- Summary
- Getting started
- Foundations
- Building with Polymer
- Summary