SlideShare a Scribd company logo
Webinar Series
Who is Drupal4Gov
Drupal4Gov is an open source community for developers with an
interest in making government more open to open source.
We encompass many open source projects but have our
beginnings in the Drupal project.
Members may have experience with any open source project from
licenses to development.
Training Day
July 23rd!
Drupal GovCon - annually in the summer @NIH
Gov Summit at DrupalCon NA - annually
Global Training Days
Webinar Series - monthly (3rd Thursday at 3pm EST)
Drupal4Gov Offers
@govdrupal
@drupalgovcon
@drupalgovcon
The case for
Web components
Bryan
Ollendyke
@btopro
Drupal dood
The case for Web components - Drupal4Gov webinar
Bryan
Ollendyke
@btopro
Web components dood
“The 2000 year leap but for the web, happened last year,
and no one has realized it yet”
- ?
“The 2000 year leap but for the web, happened last year,
and no one has realized it yet”
- btopro
reading this right now
We can all be BFFs and leverage each other’s efforts
without adopting every aspect of each other’s work.
Welcome, to Web components.
What are web components?
The case for Web components - Drupal4Gov webinar
<div style="background:yellow;">
<a href="link.com"
style="color:black;">
Name
</a>
</div>
Simple button example
Simple button as web component
<my-button
link="link.com"
title="Name">
</my-button>
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
Solving the design system problem
My interface designer makes a
simple “button” for us to use
My interface designer makes a
simple “button” for us to use
My team has to integrate my
designer’s “button” X number of
buttons X number of projects
My interface designer makes a
simple “button” for us to use
My team has to integrate my
designer’s “button” X number of
buttons X number of projects
...My “team” will screw this up
How web components solves this..
Shadow DOM keeps CSS scoped
Custom elements makes HTML semantic
Both make JS scoping simple
WC keeps design intentional
WC makes design sustainable
WC make web professionals happy!
Accessibility becomes manageable
Maintenance costs collapses
Cost of development collapses
Project churn is eliminated
All Future projects cost less
Each new project expands capabilities
WC make web managers happy!
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
Escape the Drupal design island
â—Ź Reuse parts of your Drupal 7 sites in Drupal 8
â—Ź Enhance your Drupal 6,7,8 sites safely
â—Ź Can be used across CMSs
Across JavaScript libraries
custom-elements-everywhere.com
Who else uses this?
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
Online courses we teach
Online courses we teach
Yea, but can WE use this?
analytics.usa.gov - April
analytics.usa.gov -- Now
@btopro parsing the data
Last 90 days of 2019
â—Ź 85.9% -- Works natively
â—Ź 12.6% -- works with polyfills
â—Ź = 98.5% -- Will work with web components!
Global traffic stats - gs.statcounter.com
February 2019 (browserstack.com + physical devices)
● 🔥 Confirmed working -- 98.26%
● 🤗 Should work / unconfirmed -- 99.64%
● 🤗 Numbers are without progressive enhancement
● Let’s talk Edge / IE
We have to support IE / Edge!
gs.statcounter.com
mspoweruser.com - Mar 24, 2019bgr.com - Dec 6, 2018
theverge.com - June 19,
2019
#usetheplatform
IE 11
Windows 7 EOL 2020
gs.statcounter.com
analytics.usa.gov
So, that’s not IE 11
PC World - Jan 31, 2019
So, that’s still years away
Windows IT Pro Blog - Feb 6, 2019
HAXcms progressive enhancement strategy
btopro.com/all-screen-rights - All screens have rights
Numbers are MY personal strategy aligned with Government data
== NoJS / fallback version (11.1%)
== ES5 web components + Polyfill (4.3%)
🔥 Modern but old version - ES5 web components + Polyfill (4%, Firefox)
🔥 Evergreen / ES6 - ES6 web components (80.6% of traffic, today!)
Btopro blog post, NOjs or IE6 - 11
Btopro blog post, Edge (until chromium)
Btopro blog post, Evergreen, ES6
My Guess 1 year from now
== NoJS / fallback version (10%)
🔥 Evergreen / ES6 - ES6 web components (90% of traffic)
My Guess 2 year from now
== NoJS / fallback version (5%)
🔥 Evergreen / ES6 - ES6 web components (95% of traffic)
So if your planning a project or starting one..
🔥 Talk about design and development needs across your portfolio
🔥 Look at what current projects could be augmented
🔥 Start small – We started with a single icon, then a button, then a menu
* Be mindful of progressive enhancement
🔥 There’s no reason to not use web components!
We’ve 100% bought in
This is Drupal Modules.. but for design and forever
We have produced over 384 reusable web components.
Of these, 331 are general purpose.
We have more available elements than anyone I can find
record of, including Google.
They are used by ELMS:LN, HAXcms, and in the wider
open web.
They have nothing requiring our projects.
Web
components
By
numbers
Real web components we use
<vaadin-upload>
<grid-plate>
<eco-json-schema>
<code-editor>
<video-player>
<lrn-table>
<multiple-choice>
<rss-items>
<iron-ajax>
<paper-button>
<simple-modal>
<self-check>
<wikipedia-query>
<lrn-math>
<user-action>
<simple-colors>
<q-r>
<license-element>
<simple-drawer>
Real project reuse
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
The case for Web components - Drupal4Gov webinar
Haxtheweb.org – UI for web components
HAXTheWeb.org - modular authoring experience
HAXcms – A completely static, decoupled CMS
HAXcms – A completely static, decoupled CMS
HAXcms
Flat
file
structure
Additional resources
https://webcomponents.org/
https://open-wc.org/
https://www.patternfly.org/
https://lit-element.polymer-project.org/
https://github.com/elmsln/WCFactory
FreeTraining opportunity!
Drupal Govcon
Tuesday July 23rd
Bryan
Ollendyke
@btopro
Coffee addict
Questions?

More Related Content

The case for Web components - Drupal4Gov webinar

Editor's Notes

  1. Icon created by Creative Stall from the Noun Project
  2. Originally we would have made the link this way
  3. Originally we would have made the link this way
  4. The Custom Elements specification lays the foundation for designing and using new types of DOM elements. The shadow DOM specification defines how to use encapsulated style and markup in web components. The ES Modules specification defines the inclusion and reuse of JS documents in a standards based, modular, performant way. The HTML template element specification defines how to declare fragments of markup that go unused at page load, but can be instantiated later on at runtime.
  5. The Custom Elements specification lays the foundation for designing and using new types of DOM elements. The shadow DOM specification defines how to use encapsulated style and markup in web components. The ES Modules specification defines the inclusion and reuse of JS documents in a standards based, modular, performant way. The HTML template element specification defines how to declare fragments of markup that go unused at page load, but can be instantiated later on at runtime.
  6. The Custom Elements specification lays the foundation for designing and using new types of DOM elements. The shadow DOM specification defines how to use encapsulated style and markup in web components. The ES Modules specification defines the inclusion and reuse of JS documents in a standards based, modular, performant way. The HTML template element specification defines how to declare fragments of markup that go unused at page load, but can be instantiated later on at runtime.
  7. The Custom Elements specification lays the foundation for designing and using new types of DOM elements. The shadow DOM specification defines how to use encapsulated style and markup in web components. The ES Modules specification defines the inclusion and reuse of JS documents in a standards based, modular, performant way. The HTML template element specification defines how to declare fragments of markup that go unused at page load, but can be instantiated later on at runtime.
  8. The Custom Elements specification lays the foundation for designing and using new types of DOM elements. The shadow DOM specification defines how to use encapsulated style and markup in web components. The ES Modules specification defines the inclusion and reuse of JS documents in a standards based, modular, performant way. The HTML template element specification defines how to declare fragments of markup that go unused at page load, but can be instantiated later on at runtime.
  9. Google w/ YouTube, Comcast w/ xfinity. Duration of the roll out involves planning and banking on when it’s time to jump
  10. Icon created by Creative Stall from the Noun Project
  11. Icon created by Creative Stall from the Noun Project
  12. Icon created by Creative Stall from the Noun Project
  13. Icon created by Creative Stall from the Noun Project
  14. Icon created by Creative Stall from the Noun Project
  15. Icon created by Creative Stall from the Noun Project
  16. Icon created by Creative Stall from the Noun Project
  17. Icon created by Creative Stall from the Noun Project
  18. Icon created by Creative Stall from the Noun Project
  19. Originally we would have made the link this way
  20. Originally we would have made the link this way
  21. Originally we would have made the link this way
  22. Originally we would have made the link this way