SlideShare a Scribd company logo
Web components, polymer and aligning drupal's destiny
elmsln.org
Who’s involved?
What is ?
Idea Domain
courses.institution.edu/{course}
blogs.institution.edu/{course}
discuss.institution.edu/{course}
studio.institution.edu/{course}
NGDL
E
Image ©2015 Buttercups Training, used with permission.
Image ©2010 Daniel Diaz, DeviantArt.com http://danimix1983.deviantart.com/art/Ironman-184550435
Polymer helps us build web components
The Web Components spec
Not pattern lab (but similar concept)
Not Angular or React (again, similar concepts)
<awesome-explosion>
</awesome-explosion>
<awesome-explosion size=“tiny”>
<awesome-explosion size=“small”>
<awesome-explosion size=“big”>
<awesome-explosion size=“epic”>
<awesome-explosion color=“blue”>
<awesome-explosion color=“yellow”>
<awesome-explosion color=“red”>
<awesome-explosion color=“purple”>
<awesome-explosion size=“big” color=“red”>
</awesome-explosion>
Web components
Web components, polymer and aligning drupal's destiny
Ok, but what uses Web Components?
Google Earth built on web components
YouTube.com/new built on web components
YouTube.com/new built on web components
ELMS:LN is loaded with Web Components
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Web components, polymer and aligning drupal's destiny
Cons of this approach
• Browser Support
Pros of this approach
• Separation of concerns ✅
• “Headless” theming ✅
• Unidirectional data flow ✅
• Component architecture ✅
• Design Documentation ✅
• Framework Interoperability 😱
Web components, polymer and aligning drupal's destiny
FRAMEWORK
INTEROPERABILITY
• Drupal ✅
• GravCMS ✅
• Home grown ✅
• Static generators ✅
• Joomla ✅
• Wordpress 😱
LRN Web Components for Teaching & Learning
So where did Drupal go?
Web components module bridges Drupal
Render articles through a hero component
Create the elmsln-hero web component
Create the elmsln-hero web component
Create the elmsln-hero web component
Place the component in scope of drupal
Turn on the web components module
Find the elmsln-hero viewmode
Populate the fields
Render content through elmsln-hero
viewmode
Drupal + web components = ♥️
Webcomponents: One Page App integration
Place “app” in a module/apps directory
Place “app” in a module/apps directory
Add ”app_integration” to manifest.json
Go to apps/{app-name}
How the App knows to talk to Drupal
Seeing the XHR via source-path
Autoloading tag-name.php
Callback function
Return json
Leveraging Webcomponents.org
Manifest providing a block
Drag drop upload example
3 little Drupal functions away from pure PHP
Web components, polymer and aligning drupal's destiny
Relevant links:
• https://www.webcomponents.org/
• https://www.drupal.org/project/webcomponents
• https://www.polymer-project.org/
• https://drupal.psu.edu/blog
• https://www.elmsln.org/
Web components, polymer and aligning drupal's destiny

More Related Content

Web components, polymer and aligning drupal's destiny

Editor's Notes

  1. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  2. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  3. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  4. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  5. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  6. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  7. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  8. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  9. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  10. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  11. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  12. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  13. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  14. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317
  15. https://www.w3.org/TR/2016/WD-low-vision-needs-20160317