Packages vs. webcomponents vs. packages+webcomponents

I’m currently jumping on the webcomponents train, I’m converting all my app’s code to webcomponents (with Polymer) and only use meteor’s template features where it makes sense. Now I’m wondering how should we approach writing maintainable components in the future with webcomponents in mind. There are essentially three options:

1.) Just use packages for certain features/wrapping APIs
2.) Use packages and use those wrapped functions in a custom element
3.) Use no packages and wrap the API with a custom element

Number three has the upside of being easily shareable between future/other custom elements (keyword composability), ensuring that not only meteor developers can make use of those components but instead pretty much every web developer, making those elements and wrappers more interopable with other frameworks and vice/versa.

What are your thoughts on this topic? What is MDGs standpoint on webcomponents and how to use them? 1-2 months from now someone said Polymer isn’t being integrated because it’s not production ready. With a polyfill for dom-manipulating frameworks on the horizon and all major browser vendors having started to implement the finalized shadow DOM v1 specs it would be interesting to hear how we will deal with these things.

1 Like

My personal opinion on this is that web components aren’t really a thing yet. Polymer kind of works, but it seems the “non-standard” UI frameworks like Angular, React, and Blaze have been used by far more people in production.

Certainly they “aren’t really a thing yet”, especially if you compare them to Angular, React & Blaze, which have been production ready for a while. Google is building more and more large apps with Polymer/webcomponents though, a bigger recent project would be YouTube gaming.

Anyway, it would be nice for the MDG to at least have the development of webcomponents on the radar. I really doubt that it’ll take much longer for webcomponents to catch on. Except for Safari we’ll probably have webcomponents fully implemented natively in every browser in less than a few months (though Safari has already started implementation of shadow DOM afaik updates to Safari only come once per year).

Every major framework except for React is already opting in for webcomponents with their betas and React has been said to use webcomponents as well once supported natively (as stated at edge conf if I recall correct, since they want the DOM encapsulation)