Leanpub Header

Skip to main content

Web Components

The future of modern Web Apps

This book describes web components and related APIs for HTML 5 developers. Instead of using any huge framework, such powerful native technique is the future of web development. Additionally a nice and small framework called @nyaf is being featured to further simplify the first steps.

Free With Membership

With Membership

Free!

$9.99

You pay

$9.99

Author earns

$7.99
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
201
Readers
323
Pages
51,274Words
About

About

About the Book

This book describes web components and related APIs for HTML 5 developers. Instead of using any huge framework, such powerful native technique is the future of web development. Additionally a nice and small framework called @nyaf is being featured to further simplify the first steps. Each chapter explains the basic techniques step by step and the advantage of adding some custom code.

The second part is a case study about the making of the included Web Component library. It shows how such a library works, what are the gotchas and traps and how to overcome them. These chapters require a good knowledge of JavaScript and TypeScript and address professional developers.

The third part is the full documentation of the library mentioned in the former parts.

The book is written in a simple and easy to read style. With a little knowledge about HTML and JavaScript it's possible to get started.

The examples are made using TypeScript. Despite the simple style a professional approach is the underlying idea of this book. It will make you a pro once fully read and understood.

Share this book

Installments completed

2 / 2

Author

About the Author

Joerg Krause

I like to introduce myself as an experienced expert in the field of Web Technologies, especially for JavaScript/TypeScript, NodeJS, Azure Development, SQL Server, and related subjects.

I'm a developer, consultant, trainer, and software architect. I work as a freelance consultant for enterprises and run a few amazing projects on my own, such as a very smart Web Component framework and helpers for cloud-native architectures.

Contents

Table of Contents

Who Should Read this Book?

  1. Conventions used in the Book
  2. Preparations
  3. About the Author

1Introduction

  1. 1.1The Global Picture
  2. 1.2The Raise of Thin Libraries
  3. 1.3Compatibility
  4. 1.4Other Libraries

2Making Components

  1. 2.1Basics
  2. 2.2Observing Attributes
  3. 2.3Rendering Order
  4. 2.4Customized Built-in Elements
  5. 2.5Advantage of TypeScript

3Shadow DOM

  1. 3.1Preparation
  2. 3.2Built-in Shadow DOM
  3. 3.3Shadow Tree
  4. 3.4Encapsulation
  5. 3.5The Shadow Root API
  6. 3.6Summary

4Events

  1. 4.1Events in ECMAScript
  2. 4.2Events in Web Components
  3. 4.3Custom Events
  4. 4.4Smart Events
  5. 4.5Summary

5Templates

  1. 5.1HTML 5 Templates
  2. 5.2Activating a Template
  3. 5.3Templates and Web Components
  4. 5.4Nested Templates
  5. 5.5Template Styles
  6. 5.6Summary

6Slots

  1. 6.1Slots Explained
  2. 6.2Slots and Components
  3. 6.3Slot Behavior
  4. 6.4Slot Fallback Content
  5. 6.5Default Slots
  6. 6.6Slot Events
  7. 6.7Updating Slots
  8. 6.8The Slot API
  9. 6.9Summary

7Components and Styles

  1. 7.1Style Behavior
  2. 7.2Styling Slotted Content
  3. 7.3CSS Hooks
  4. 7.4Parts
  5. 7.5Summary

8Making Single Page Apps

  1. 8.1Architecture SPAs
  2. 8.2The Router
  3. 8.3Router Implementation
  4. 8.4The History API
  5. 8.5Stateful Apps
  6. 8.6Summary

9Professional Components

  1. 9.1Smart Selectors
  2. 9.2Data Binding
  3. 9.3UI less Components
  4. 9.4Template Engines
  5. 9.5Make your Own using JSX
  6. 9.6Summary

Introducing @nyaf

  1. Elevator Pitch
  2. Parts
  3. Project Configuration with TypeScript
  4. Project Configuration with Babel
  5. Components
  6. The First Component
  7. Template Features
  8. n-repeat
  9. JSX / TSX
  10. Examples
  11. Select Elements
  12. Smart Components
  13. The Life Cycle
  14. State and Properties
  15. Directives
  16. Events
  17. Router
  18. Shadow DOM
  19. Services
  20. Forms Module
  21. View Models
  22. Data Binding
  23. Creating Forms
  24. Smart Binders
  25. Validation
  26. Additional Information
  27. Custom Binders
  28. Installation of Forms Module
  29. The Flux Store
  30. Type Handling in Typescript
  31. Global and Local Store
  32. Disposing
  33. Effects Mapping
  34. Automatic Updates
  35. Installation

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub