Foreword

The beginning of your journey with Web Components.

This is a book about Web Components. UI components are a common pattern in many front end web development frameworks like Angular, React or Vue, but coding user interfaces in the context of a framework usually makes sharing those components difficult. Angular components can't be easily loaded in the context of React, for instance. The framework is a closed system.

If you can move past the framework, and possibly enjoy the simplification and standardization offered by web specifications, coding with Web Components can be quite rewarding. Working directly with specifications opens up a world once obscured by the framework. The web platform is yours to explore and find interesting ways to utilize parts of HTML, CSS, and JavaScript. By using web specifications to code UI components you can achieve extraordinary results. When used responsibly, adopting Web Components as your UI component pattern can lead to stellar performance, compliance with accessibility standards, and reusability.

At enterprise corporations it can be rather costly to support several development teams. One way to reduce operational overhead is to standardize UI components and reuse them across a software product. This cuts down on teams "reinventing the wheel". I've witnessed teams struggle with user interface development at several companies. It can be quite difficult to coordinate the use of a UI library, particularly when it's coded with a JavaScript framework. User interfaces built with the Web Components are interoperable with any JavaScript framework. Dependencies become hard to maintain over a distributed software ecosystem, teams have conflicting priorities making it difficult to not just upgrade components, but also framework dependencies. When companies adopt Web Components as the solution for a UI component library, it can reduce the churn associated with framework dependencies. I wrote this guide for developing user interfaces using only web specifications because I believe it's in the best interests of software engineers at enterprise corporations to code in a way that allows user interfaces to be used over a long lifespan. Corporations shouldn't have the reinvest in user interfaces at the rate JavaScript frameworks go in and out of fashion.

It's one thing to help by providing examples or peer programming, but I didn't think that was enough. While coding a micro-library for developing Web Components, I found it difficult to find resources. This book is designed to take on a journey with Web Components as if you were developing a UI library at an enterprise corporation. You won't just get hands-on experience coding UI with Web Components, but also learn how to test and maintain those components in the context of a distributed UI library. This book will make you proficient enough to develop a UI library, web application or some other fantastical flights of fancy with Web Components.

About the author#