DEV Community

Cover image for The Past, Present, and Future of Web Components

The Past, Present, and Future of Web Components

Besworks on May 12, 2025

There is a lot of misinformation and misunderstanding surrounding Web Components. Many developers do not see their benefit or have misconceptions a...
Collapse
 
jantimon profile image
Jan Nicklas • Edited

JSX is a standard - preact vue react typescript all follow the very same standard

Could you please explain why @click and refs is "embracing the standard"?

html`
      <button @click=${() => this.sort(1)}>Sort ascending</button>
      <input ${ref(this.inputRef)}>
    `
Enter fullscreen mode Exit fullscreen mode
Collapse
 
besworks profile image
Besworks

You are comparing a few decorators in a templating engine vs a complete markup language that transpiles into JS which then generates HTML.

JSX is NOT a web standard. Nor is TypeScript. Neither of these things work directly on the web without transpiling and likely never will.

BTW, personally I do not like syntactic sugar in any from.

Collapse
 
jantimon profile image
Jan Nicklas

JSX and Typescript are industry standards

Does that mean you are not only against frameworks but against transpiling in general?

Thread Thread
 
xwero profile image
david duymelinck

You mention industry standard so you are aware that it is a different kind of standard, otherwise you wouldn't add the specification.

The problem is that developers think they can't work outside the industry standards. I recently read a comment about how Tailwind made layers possible.
I have no problem with people using the DSLs and frameworks of their choice, but they should at least have an idea why it is preferable to using the technology it is build on.

Thread Thread
 
jantimon profile image
Jan Nicklas

industry standard means for me: chosen by millions
browser standard means for me: chosen by a handful

I don't think that's good or bad in any way because in the end it should never be WHO created the standard but only wether the standard itself is (still) good

One of my most preferred quotes is "Best practices deserve to be challenged" - so even if it is a industry standard today it might change tomorrow

I agree with your Tailwind example and hope people will take their time to learn also CSS not only an abstraction.

However who am I to judge how much knowledge a creator must have to build for the web?
In the end some might argue to understand how @layer works you should read its C++ implementations

I believe the most important thing is not the technology but the User Experience

Thread Thread
 
xwero profile image
david duymelinck

With user experience i think you mean developer experience? It is nice to have the most readable abstractions possible, but that should not be the most important thing in development.

You mention industry standards can change, the thing with web standards is that they are not meant by be changed. The standards operate on different levels. We all need safe drinking water, web standard, countries decide to add additives, industry standard.

Industry standards are also more a strategic decision by companies than a developers choice. If you have a lot of people making certain software it is easier to hire people, a lot of problems are already solved and can be plugged in using packages.
The best example is Wordpress. It is the CMS industry standard, but no developer is willingly learning how to use Wordpress. As a PHP developer I'm ashamed this is an industry standard.

Collapse
 
dannyengelman profile image
Danny Engelman

One of the earliest glimpses of component-style architecture came from Mozilla.

That was 2001

Microsoft HTML Components (HTC) was 1998

John Udells BYTE article on Web Components was 1996

Collapse
 
besworks profile image
Besworks

Let's not reignite the browser wars 😏 but...

XUL was created in 1997 for Netscape. XBL came later in 2001.

That article may predate this but it doesn't really relate. It's mostly about cgi scripting, though it does mention ActiveX and Java which (while technically are examples of components) weren't exactly the same idea. The difference being that XUL was an extension of HTML with a library of widgets rather than a mechanism for loading compiled application code. Hence the name they were eventually given: applets.

Microsoft's HTML Components are definitely relevant to the history but I chose not to include them in the article as it was already quite long, Internet Explorer no longer exists, and XBL had the most direct influence on Shadow DOM. However, many concepts from their original proposal are clearly evident in the modern Web Component standard.

Collapse
 
dannyengelman profile image
Danny Engelman

Whilst we are not forgettting history

Everyone should know about the Mundaneum

independent.co.uk/travel/europe/mu...

Collapse
 
nevodavid profile image
Nevo David

Pretty cool seeing the web finally getting stable tools I actually want to use - feels like it’s been a long grind for this kind of stuff.