Web Components Are Dead?

I sometimes hear web developers discuss how Web Components are dead. They were DOA. Done. A nice idea, but one that no one wanted. Hey, the spec has been around for awhile now and who is using them?

“It takes 10/20 years to become an overnight success”

Oh how often we fall for that trap. Remember the Ajax revolution? For the folks who were “doing Ajax before it was cool” it was almost comical to see how it surged after years of lying dormant. I remember giving talks about how to “build killer web sites with dhtml!” (or some other silly title) and the room was a lot more full once Jesse James Garrett pushed it out there in a way that made sense to folks.

Microsoft built an ActiveX component to solve a problem for the Outlook Web team. Later, Mozilla implemented it in Gecko. Multiple implementations, much needed in a world where Firefox was fighting for share from IE.

With Web Components we are still missing some crucial browser support, but it is on its way thanks to good browser engine folk. Once we can natively use Web Components, will that make a difference? I hope so.

Trust me, it tastes great

When <React cameOntoTheScene> there was an outcry

We believe in separating our concerns! I want my markup separate from my layout separate from my view logic. How dare you mix this up. Remember PHP/ASP/JSP? Ugh!

Those who gave it some time realized that the concerns were better separated this way. Being able to holistically look at a component was great. Being able to actually compose and abstract nicely was great. Once your eyes could see past syntax, you realized that it maybe was a feature and not a bug.

So, one thing React has done well, is that it has shown us that components can actually work well on the Web.

Now, React has had to work around the browser to give us the declarative development model that many of us enjoy. What if we could raise the browser platform to allow it to take on more? This way you maybe don’t run into the pain of the bugs that can occur when you have retained vs. immediate mode APIs. Could the browser then help developers with more fast by default?

When XHR came about it solved a real need. We want to do inline auto-completing. We need to talk back to the server. We don’t want to do so via Flash or iframe hacks. XHR eventually did enough to fix this. Do Web Components have a similar solution? Are we sick of not being able to share components on the Web? Are we tired of not having a foundation and having the “oh crap I really want that component but it is based on jQuery and I am on Prototype!” of old?

I really hope so. I am excited to see Web Components get more async and perf-y. I am excited to see more browser implementations. Oh, and I am excited to be able to work with components that I can compose and reuse.

You never know the future, but I am not writing off Web Components before it has the chance to be an overnight success.

As we see real world usage such as AMP, it may show developers that it is ready for prime time.

Leave a comment

Your email address will not be published. Required fields are marked *