Skip to content

Commit

Permalink
add doc for "why web components" and update FAQ (microsoft#5094)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt authored Aug 25, 2021
1 parent db90173 commit 8c49456
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions sites/website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ module.exports = {
type: "category",
label: "Resources",
items: [
"resources/why-web-components",
"resources/license",
"resources/security",
"resources/browser-support",
Expand Down
3 changes: 3 additions & 0 deletions sites/website/src/docs/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ At this time, `fast-element` has a focus that's a bit different from the typical

"Web Components" is an umbrella term that refers to a collection of web standards focused on enabling the creation of custom HTML elements. Some of the standards that are under the umbrella include the ability to define new HTML tags, plug into a standard component lifecycle, encapsulate HTML rendering and CSS, parameterize CSS, skin components, and more. Each of these platform features is defined by the W3C and has shipped in every major browsers today.

### Why should I choose Web Components over [other JavaScript framework]?
Great question! Check out [why you might choose Web Components](/docs/resources/why-web-components) for your project.

### Are Web Components "done"?

The work on Web Component standards, like the rest of the web, is ongoing. New APIs continue to be designed and released. Some recent APIs include Form Associated Custom Element APIs and CSS Shadow Parts. The W3C is currently working on standards for things like Constructible Style Sheets, Declarative Shadow DOM, Scoped Element Registries, Custom Pseudo Selectors, and more.
Expand Down
32 changes: 32 additions & 0 deletions sites/website/src/docs/resources/why-web-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
id: why-web-components
title: Why Web Components?
sidebar_label: Why Web Components?
custom_edit_url: https://github.com/microsoft/fast/edit/master/sites/website/src/docs/resources/why-web-components.md
---

### You might choose Web Components for performance.

Web Components have proven to be consistently faster than many popular JavaScript frameworks when it comes to both startup time and paint performance. They also use less memory and often result in significantly smaller bundle sizes when compared to their JavaScript coutnerparts. Standard benchmarks show our component implementation outperforming React, Angular 12, Vue 3.2 as well as many others.

### You might use Web Components for their interoperability.

Every Web Component inherits from HTMLElement. So, Web Components seamlessly interoperate with any library or framework designed to work with DOM. This includes modern frameworks like React, Angular, Vue, etc. but also libraries like jQuery and others. Adopting Web Components enables use of a consistent component library across a diverse set of applications. So, teams can standardize on the components and design system without having to force a specific architecture or framework on the application developer.

### You might leverage Web Components because they can be incrementally adopted.

You do not have to re-write an existing app or site to take advantage of Web Components. Since Web Components just extend the palette of available HTML elements, you can choose to simply start leveraging whatever custom elements you want within your existing app the same way as you use built-in elements.

### You might choose Web Components to be future-compatible with the open web.

Web Components are *literally*, the standard component model of the web, written into the HTML specification. The base features have shipped in every modern browser and many new features are planned for the DOM and CSS standards. Some of these new HTML capabilities will only be available to Web Components, so continuing down the path of non-standard component models will prevent you from taking advantage of platform improvements. Aligning yourself with Web Components and other standards will enable you to get the greatest benefit from the evolving web platform.

### You might choose Web Components if you are creating an extensible ecosystem or application with a plugin model.

By choosing web components, you enable your customers to choose their preferred application framework or library, rather than forcing them to use any particular JavaScript framework. Building your ecosystem or plugin model around one framework often means the exclusion of an entire set of customers who build on another.

### You might choose Web Components if you want to include community members who are not proficient with JavaScript.
Most of the popular JavaScript frameworks require strong JavaScript skills and knowledge and often at least an intermediate proficiency for use. Web Components can be used without any knowledge of JavaScript whatsoever. Building around Web Components opens up opportunities for a broader range of customers with more diverse backgrounds.

### Who is using Web Components?
Across the industry we see a pretty big adoption since January 2020. This includes not only heavy investment from Microsoft, but also from Google, Adobe, Salesforce, SAP, MIT, SpaceX, and many more. Curious who else is using Web Components? Check out the ever-growing list of companies [here](https://arewebcomponentsathingyet.com/).

0 comments on commit 8c49456

Please sign in to comment.