5. An individual software component
is a software package, a web
service, a web resource, or a
module that encapsulates a set of
related functions (or data).
- Wikipedia
7. Web Components enable Web
application authors to define
widgets with a level of visual
richness and interactivity not
possible with CSS alone, and ease of
composition and reuse not possible
with script libraries today.
- Introduction to Web Components
9. WE WANT MORE
Security / isolation
Speed / small size
Future-proofness
Consistent and small API
Controlled composition
Ease of distribution
A/B Testing support
Good developer experience
Active community
Server-side rendering
10. THIS IS OUR TEXT INPUT
THIS IS WHAT IT NEEDS TODAY
3 DOM elements ~100 CSS lines 2 JS polyfills
Type in me
13. PROS
Security / isolation
Works everywhere
Easy to embed
CONS
Doesn't participate in layout
Can't send DOM events
Very resource-intensive
Composition is awkward
14. W3C HAD SOME IDEAS
PAGE INTEGRATION AND DYNAMIC CONTENT WITH
seamless srcdoc
UNFORTUNATELY BROWSER SUPPORT ISN'T THERE
16. Easy as a pie
$(".z-input").zInput();
Or even just HTML
<input class="z-input" placeholder="Type in me"/>
<script src="z-input.js"></script>
And we have what we want
Type in me
17. It's not all good, though
No standard API
No isolation
Composition is a gamble
No server-side rendering
Usually low quality
Performance is questionable
26. AWESOME, BUT NOT WITHOUT PROBLEMS
No security / isolation
API is still unstable in some areas
Slow server-side rendering (big chunks take 10-20ms)
The data has to be sent with the markup
Questionable upgrade path
36. ISSUES STILL TO SOLVE
Serializing DOM is awfully slow on Android and Mobile IE
All the required APIs need to be proxied
Events become async and unstoppable