WebComponents are lightweight, cross-framework custom elements that can be used privately within an application. They allow encapsulation of HTML, CSS, and JavaScript into reusable components. The document discusses why WebComponents are useful and provides links to learn more about them as well as addons for using WebComponents within Ember applications, including ember-cli-stencil and ember-wc-utils. The author welcomes any questions.
The Case for HTTP/2 - EpicFEL Sept 2015Andy Davies
HTTP/2 is here but why do we need it, and how is it different to HTTP/1.1?
Video - https://www.youtube.com/watch?v=ob-CnA9YmiI
These are the slides from my talk at Front-End London's one day conference, EpicFEL
Git your Jekyll on - WebCamp Ljubljana 2015Alja Isakovic
An intro talk about Jekyll, a Ruby-based static website generator and my story of moving my old blog from Blogger to a GitHub Pages hosted Jekyll. The talk includes a few practical Jekyll examples and highlights the benefits of using a static website generator for simple multi-page websites that don't change often or personal blogs.
The slides were prepared for my talk at WebCamp Ljubljana 2015
Michal will talk about game development with Open Web Technologies such as JavaScript, HTML5 and CSS3, it’s history, creating crossplatform games for desktops, mobiles, tablets and other devices Javascript could run on. During the talk he will present couple methods of animations, implementation of game’s logic and different ways to communicate between players.
Rags to Open Source - AllThingsOpen, Raleigh, NC 2014Mike McNeil
How did a small, completely self-funded team build a web framework that became more popular than comparable tools with million-dollar budgets? By welcoming the outsiders. Mike will recount how Sails.js grew from an internal tool to one of the most popular frameworks for Node.js, without forgetting its roots.
Javascript is quickly becoming more than just the lingua franca of the web– it’s rapidly growing in popularity on servers, mobile devices, and embedded systems. In many ways, “Javascript is the new Java.” More and more backend developers are becoming familiar with tools like Bower, Yeoman and Grunt, and Angular has empowered web developers to create single page apps as part of their everyday workflow. As the industry standardizes around Javascript, it’s not only important to take advantage of new tools; we must also make sure these new tools and methodologies are accessible and understandable to developers from more traditional backgrounds.
In this talk, Mike will reflect on the experiences he’s had building and managing an open-source Node.js framework, Sails.js. He’ll discuss the success we’ve had attracting interlingual developers to Sails, and share some lessons and difficulties we’ve encountered migrating a new generation of developers from PHP, Java, .NET and Rails to Node.js.
He will share examples from both sides of the spectrum, both community-related and technical, including:
How to encourage (not dissipate) the growth of subcultures within an open-source community
How to reconcile different levels of familiarity and preference for different collaboration tools (Github, IRC, Google Groups, etc)
How to assimilate the technical heritages from past frameworks (i.e. syntax, nomenclature, project structure)
How to meet expectations around reference documentation, and direct community contribution towards guides and tutorials
Mike is an engaging speaker with a knack for dynamic Q&A. He is passionate about the subject matter and can adapt the talk to any time frame.
http://allthingsopen.org/talks/rags-to-open-source-the-story-of-sails-js/
http://allthingsopen.org/speakers/mike-mcneil/
The Case for HTTP/2 - EpicFEL Sept 2015Andy Davies
HTTP/2 is here but why do we need it, and how is it different to HTTP/1.1?
Video - https://www.youtube.com/watch?v=ob-CnA9YmiI
These are the slides from my talk at Front-End London's one day conference, EpicFEL
Git your Jekyll on - WebCamp Ljubljana 2015Alja Isakovic
An intro talk about Jekyll, a Ruby-based static website generator and my story of moving my old blog from Blogger to a GitHub Pages hosted Jekyll. The talk includes a few practical Jekyll examples and highlights the benefits of using a static website generator for simple multi-page websites that don't change often or personal blogs.
The slides were prepared for my talk at WebCamp Ljubljana 2015
Michal will talk about game development with Open Web Technologies such as JavaScript, HTML5 and CSS3, it’s history, creating crossplatform games for desktops, mobiles, tablets and other devices Javascript could run on. During the talk he will present couple methods of animations, implementation of game’s logic and different ways to communicate between players.
Rags to Open Source - AllThingsOpen, Raleigh, NC 2014Mike McNeil
How did a small, completely self-funded team build a web framework that became more popular than comparable tools with million-dollar budgets? By welcoming the outsiders. Mike will recount how Sails.js grew from an internal tool to one of the most popular frameworks for Node.js, without forgetting its roots.
Javascript is quickly becoming more than just the lingua franca of the web– it’s rapidly growing in popularity on servers, mobile devices, and embedded systems. In many ways, “Javascript is the new Java.” More and more backend developers are becoming familiar with tools like Bower, Yeoman and Grunt, and Angular has empowered web developers to create single page apps as part of their everyday workflow. As the industry standardizes around Javascript, it’s not only important to take advantage of new tools; we must also make sure these new tools and methodologies are accessible and understandable to developers from more traditional backgrounds.
In this talk, Mike will reflect on the experiences he’s had building and managing an open-source Node.js framework, Sails.js. He’ll discuss the success we’ve had attracting interlingual developers to Sails, and share some lessons and difficulties we’ve encountered migrating a new generation of developers from PHP, Java, .NET and Rails to Node.js.
He will share examples from both sides of the spectrum, both community-related and technical, including:
How to encourage (not dissipate) the growth of subcultures within an open-source community
How to reconcile different levels of familiarity and preference for different collaboration tools (Github, IRC, Google Groups, etc)
How to assimilate the technical heritages from past frameworks (i.e. syntax, nomenclature, project structure)
How to meet expectations around reference documentation, and direct community contribution towards guides and tutorials
Mike is an engaging speaker with a knack for dynamic Q&A. He is passionate about the subject matter and can adapt the talk to any time frame.
http://allthingsopen.org/talks/rags-to-open-source-the-story-of-sails-js/
http://allthingsopen.org/speakers/mike-mcneil/
Introduction to LeapJS the Javascript API for LeapMoiton and building a UI to respond to hands in space with React and Flux. Presented at ConnectJS 2015
Rapid Prototyping with Sass, Compass and Middleman by Bermon PainterCodemotion
This talk will cover some of the benefits of building a rapid prototyping framework with Sass & Compass along with the static site generator, Nanoc. you’ll discover how to rapid prototype pages, widgets and interactions that can be used for usability testing and to help concept ideas. Since it’s all built on Ruby it’s easy to migrate over to the real application later or toss away
5 Quick JavaScript Performance Improvement TipsTroy Miles
JavaScript is arguably the most important language in the world. It comes included in nearly every desktop and mobile browser. It powers the client-side of apps like Facebook and GMail. It is the language of choice for mobile development environments like Apccelerator's Titanium and Apache's Cordova (aka Adobe's PhoneGap). It is even on the server now in Node.js. Yet when programmer's run into performance issue with JavaScript their first inclination is to blame its interpreted nature, not realizing that simple changes in the structure of their code can result in sometimes significant improvements in performance. In this session I will show five quick changes you can make to your JavaScript code to improve its performance and explain why they work.
The Case for HTTP/2 - Internetdagarna 2015 - StockholmAndy Davies
HTTP/2 is here but why do we need it, how is it different to HTTP/1.1 and what does the mean for developers?
Slides from my talk at Internetdagarna 2015, Stockholm
Performance is about retaining users, improving conversions, user experience. It's about people. DevTools performance tab as well as some hidden gems that you probably had no idea existed.
Slides from my Ignite (20 slides, auto-advancing every 15 secs) talk at WebPerfDays, Mountain View.
Not sure they will make sense standalone but talk was recorded and will be available at some point.
Would also like to work this up into a longer talk at some point.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Introduction to LeapJS the Javascript API for LeapMoiton and building a UI to respond to hands in space with React and Flux. Presented at ConnectJS 2015
Rapid Prototyping with Sass, Compass and Middleman by Bermon PainterCodemotion
This talk will cover some of the benefits of building a rapid prototyping framework with Sass & Compass along with the static site generator, Nanoc. you’ll discover how to rapid prototype pages, widgets and interactions that can be used for usability testing and to help concept ideas. Since it’s all built on Ruby it’s easy to migrate over to the real application later or toss away
5 Quick JavaScript Performance Improvement TipsTroy Miles
JavaScript is arguably the most important language in the world. It comes included in nearly every desktop and mobile browser. It powers the client-side of apps like Facebook and GMail. It is the language of choice for mobile development environments like Apccelerator's Titanium and Apache's Cordova (aka Adobe's PhoneGap). It is even on the server now in Node.js. Yet when programmer's run into performance issue with JavaScript their first inclination is to blame its interpreted nature, not realizing that simple changes in the structure of their code can result in sometimes significant improvements in performance. In this session I will show five quick changes you can make to your JavaScript code to improve its performance and explain why they work.
The Case for HTTP/2 - Internetdagarna 2015 - StockholmAndy Davies
HTTP/2 is here but why do we need it, how is it different to HTTP/1.1 and what does the mean for developers?
Slides from my talk at Internetdagarna 2015, Stockholm
Performance is about retaining users, improving conversions, user experience. It's about people. DevTools performance tab as well as some hidden gems that you probably had no idea existed.
Slides from my Ignite (20 slides, auto-advancing every 15 secs) talk at WebPerfDays, Mountain View.
Not sure they will make sense standalone but talk was recorded and will be available at some point.
Would also like to work this up into a longer talk at some point.
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaYara Milbes
Discover the transformative power of the WhatsApp API in our latest SlideShare presentation, "Top 7 Unique WhatsApp API Benefits." In today's fast-paced digital era, effective communication is crucial for both personal and professional success. Whether you're a small business looking to enhance customer interactions or an individual seeking seamless communication with loved ones, the WhatsApp API offers robust capabilities that can significantly elevate your experience.
In this presentation, we delve into the top 7 distinctive benefits of the WhatsApp API, provided by the leading WhatsApp API service provider in Saudi Arabia. Learn how to streamline customer support, automate notifications, leverage rich media messaging, run scalable marketing campaigns, integrate secure payments, synchronize with CRM systems, and ensure enhanced security and privacy.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Today I’m going to talk a bit about WebComponents and using them in Ember.
Let’s start with talking about what WebComponents are.
WebComponents are a means for developers to create components that are native to the browser. Instead of being tied to a framework like Ember or React, these extend from the built-in HTMLElement class, and like other HTML elements, can be used in any framework.
As Ember developers, we’re familiar with the basic idea of components and why we want to use them.
They let us create boundaries in our templates to encapsulate logic with explicit inputs and outputs -- namely, properties in and DOM out. This helps is re-use code throughout a single application or, if we’re lucky, across many.
In order to have a discussion point, let’s take a quick look at a basic WebComponent implementation.
Here’s a screenshot of something I put together in CodePen. If you want to open it up for yourself, you can check out the bit.ly link down at the bottom.
To summarize, we define a component that renders a greeting based on the name attribute of the element. But let’s step through the code together to make sure we’re all on the same page.
Starting down here with the JS file, we define a class for our new component. The constructor is pretty basic -- don’t worry about the attachShadow bit for now, we’ll come back to it.
connectedCallback is the WebComponent equivalent of didInsertElement and is where we can read the name value that the user set, and create the contents of the component.
Finally, down at the bottom we map the name-tag element to the class we just defined
Above the JS we have a bit of HTML and CSS for the page, setting up some global styles and the page content, which uses our new element.
We’ll dive into the details a bit more later, but to illustrate what it means to create your own HTML elements, I want you to focus on this part here.
<advance animation>
This doesn’t look all that different from what you may have seen with other web frameworks. You have a custom name for your component and can pass it properties to customize it. But in this instance there isn’t React or or Ember under the hood here making that work; that’s just an HTML file. Anywhere that a regular DOM element would be valid, our new name-tag element is too.
Since Ember already supports its own components, let’s talk a bit about what sets WebComponents apart and why you might choose them over Ember components.
There’s three main characteristics of WebComponents I want to dive into.
Light-Weight
They work across across frameworks
Privacy features missing from other types of Components
Let’s start with “light weight”. I’m sure you’ve heard this term describe lots of things, but what does it even mean, right?
I’ll offer a definition that works well for WebComponents.
Going back to the example component we saw before, the entire implementation is 17 lines of code, including the template and styles.
Since they are built on top of primitives provided by the browser, they can be shipped to users without dependencies. So, if a tiny payload is what you’re after, WebComponents can be an excellent way to achieve that.
Additionally, WebComponents can be lazy-loaded even in environments like Ember where lazy-loading isn’t a built-in feature. This way, the majority of the code is only downloaded once the user actually needs it.
Another big benefit to writing WebComponents is that they work with any framework.
This is less of a concern if you’re only writing Ember apps, but at many companies -- like here at Netflix -- there are applications written in Ember, React, Angular, Vue, whatever.
Just like we take for granted that we can use a DIV in any templating language, a WebComponent can also be used anywhere that supports HTML. This works great for components that need to be shared across teams, like a design system implementation.
A great example of an open-source project leveraging WebComponents for cross-browser support is Wired, a set of WebComponents that define these really interesting hand-drawn elements that are prefect for prototyping.
Rather than creating React components specifically, authoring in WebComponents allows them to support any framework, or none at all. They can still maintain a great experience for React developers while also being inclusive other communities.
The last major feature that makes WebComponents different is the ability to leverage ShadowDOM in WebComponents.
ShadowDOM is a feature that has been introduced into Chrome and Safari over the last year or so, with support from FireFox and Edge planned for this year.
It allows you to create a DOM tree within an element that is isolated from the tree outside of it. This isolation created a boundary that CSS styles can’t pass through, meaning that the inside of your component isn’t affected by global styles. Styles defined inside of the component also are prevented from affecting anything outside of the Shadow DOM.
If we take a look at our example component again, we see that the template is inserted into the “shadowRoot” of the component.
We have some global styles that would normally bleed into the component and set the color, but with Shadow DOM they don’t. Plus, the styles defined inside the component, setting the color to red, only affect the paragraph inside the component, not the one outside.
It’s common these days to use build tools to achieve this effect. Ember addons like Ember CSS Modules or Ember Component CSS allow us to scope styles to a specific component by namespacing them at build-time. Shadow DOM allows us to achieve the same effect without any build-time concerns.
If we look at the actual DOM tree we can see this isolation in action.
In the top example, when exploring the DOM, we only see the “shadow root” where the private inner contents are stored. From the outside context, these elements do not exist.
This means that DOM APIs that query for elements also don’t return anything inside of the Shadow DOM, making it difficult to alter their contents from the outside.
If we open the shadow root in the inspector, shown in the second example, we can find the content that we inserted there, including the CSS styles for the paragraph tag.
So if these features are compelling for you and you’re ready to try building some yourself, where should you start?
You can always just write them manually, like the example code we’ve look at, but there are also tools that can make the development process easier.
After looking at a bunch of the tools out there, I’ve come to really like Stencil.js.
Stencil is written by the Ionic team, the authors of the Ionic hybrid app framework or their popular Ion Icons.
Stencil’s values seem very much in line with Ember’s.
They lean on conventions for their folder structure, have a focus on testing, and give you a build system out-of-the-box so you don’t have to get bogged down in configuration.
Some other things I’ve really come to appreciate are support for Sass and TypeScript, lazy loading enabled by default, and automatic polyfilling for browsers that don’t yet support all of the required APIs. You can really just focus on creating great components and lean on Stencil for the complicated parts.
Let’s take a look at the same name-tag element, this time build with Stencil.
Right off the bat, you notice we’re working with TypeScript, which is supported by default by the Stencil build tools.
Our class is decorated by the base Stencil implementation, which defines the name of the tag, the filename for the stylesheet, and whether or not to render to ShadowDOM.
We’re explicit about what properties are expected and what their types are. There are additional decorators provided by Stencil for emitting events, defining observers, and creating public methods that can be called on the element.
Down at the bottom we define a render method that returns a JSX template, which will feel very familiar to anyone with experience in React.
Lastly, we can define our styles in a separate stylesheet, where Sass is supported. That file will be compiled to regular CSS by Stencil’s build tools and inserted into the ShadowDOM for us.
Stencil’s build tools are able to compile a set of elements like this into a JavaScript package that is easily imported by tools like Webpack or the Ember CLI or linked to with a script tag.
While you do have to pay for the overhead of the Stencil library itself, the improvements in development experience may be worth that cost.
The last things I’d like to touch on is using WebComponents in Ember applications.
For basic components like the first one we looked at, you can simply define the WebComponent in a JavaScript file and start using the custom element in your templates.
If you choose to use Stencil for your own WebComponents, the “ember-cli-stencil” addon that I created handles finding Stencil components in your dependencies and will automatically pull them into your JavaScript bundle while maintaining support for lazy loading. It also handles setting up some boilerplate required to let Ember know about events your Stencil components may emit.
The only snag you may run into is around binding event handlers on WebComponents.
Much like Ember Components practice “Data Down, Actions Up”, WebComponents practice “Data Down, Events Up”.
In this example, we use the element modifier form of the action helper to execute the greetZoey action when the greet event is fired.
Prior to Ember 3.1, some assumptions made in the Glimmer compiler broke the ability to do this. As part of the initial angle-bracket Ember component support, anything that looked like an Element containing a hyphen was treated as an Ember component, which don’t support element modifiers. The above template won’t even compile.
Now that angle-bracket components will come to Ember with a CamelCase identifier instead, Ember 3.1 was able to fix this issue.
If you want a decent work-around solution for older Ember versions, the ember-wc-utils addon includes a helper component that can catch the events for you so that you avoid the error.
I’m happy to take any questions that you may have now or chat afterwards.