7 ms·
My team is using web components, polymer 1, 2, React, Vue and Riot in 3 strategic projects. I have a bigger rant about web components, and polymer and interest
by diminish 10y ago
My team is using web components, polymer 1, 2, React, Vue and Riot in 3 strategic projects.
I have a bigger rant about web components, and polymer and interesting enough, I believe - none except one - of the article owner's comments matter much.
Here's another rant and what currently sucks at web components (for us)
1. Still no adequate browser support coverage (OP's point)
- Google polymer team keeps the mood up, is excited and does great things but we're still waiting
-- for Firefox to support it, (which declined to implement html imports). I kind of think Mozilla is sabotaging the efforts for some political reason after reading their comments.
-- for Safari 10.2 to support it natively
-- for Edge to care.
Unless all the browsers support the v1 spec, we end up being just another JS framework and the Polyfill webcomponent-lite.js itself becomes a framework in competition with vue, react, riot, and others.
2. Web components (especially) polymer ones are not a good citizen inside an HTML page next to others.
-- Due to component scoping (which is ok), style scoping in the main document css (custom style) (which is weird) and DOM and shadow dom, you end up feeling hopeless at some point.
-- I just want to use the paper-toggle and I end up downloading 100s of files.
3. The opposite of "it just works" ( as someone wrote somewhere, kind of, like you invented the opposite of it just works.)
- Polymer, and the paper, iron and other libraries are cool, but they somehow fail silently and often. It's hard to figure out what went wrong.
4. Polymer team is trying to replicate the cool other JS tech and tools, and it just lags behind. (ES6 in polymer 2.0, the still beta app router, bower, gulp and OMG.js ....)
5. The iron, and then paper, and other elements are too heavily interdependent and no other leaner library or collection appears in sight.
- A lot of nested imports
- and the hopeless the wait for HTTP/2 and the future web of 2020s.
I will write later what can be done.
- dmitriid 10y agoThank you!
- dmitriid 10y agoOne of the main problems I have is that, well, if buy into Polymer, that's what you buy into: yet another vendor lock in. Otherwise you wouldn't even be able to write a simple Todo List: https://github.com/PolymerLabs/todo-list/blob/master/app/index.html https://github.com/PolymerLabs/todo-list/blob/master/app/ind... (all the {{}}'s etc.) And then... They are really not different from React/Angular/<add your own> :)
- spankalee 10y agoIt's completely different. With Web Components you can start migrating away by using components just not written in Polymer. How is that anything like React or Angular that really don't let you interop with other libraries out of the box?
- danabramov 10y agoCould you clarify what you mean by "don't let you interop"? React gives you a DOM node so you can render anything into it, including an Angular component, a jQuery plugin, or a web component. How is that not interop?
- diminish 10y agoFor web components to still win I see: 1. A very lighweight set of touch-first self-contained UI components collection Carousel, navigation bars, card, switch (toggle), a range slider, calendar/time picker, badge, rating and some. They must be self-contained and light-weight. All the set of iron-, paper-, vue, (material, mintui, and even Bootstrap set available. It must be so easy, and so cooperative that WordPress themes must be able to use those components with 2 lines of imports. If the old web starts using it, not the mobile app web, it ll be easier to force other browsers to support it natively. 2. Full browser coverage and elimination of polyfill. Next to Chrome/Opera and Chromium++, Safari 10.2. Then HTML import support issue (ES6 modules?) with both Safari and Firefox remain as still big obstacles as well as Edge's uncertain future support/ 3. Mobile App-like components and features only for the advanced apps, - Router, caching, service workers.. - Better debugging and error messages. - Better failover. - Here competition with angular, vue, react, riot and others seems hard to win, and this must be a separate battle.
- CJefferson 10y agoIt looks like you are saying only Chrome supports this (firefox, safari and edge all currently don't). Maybe instead of blaming everyone else, it's worth looking at why no-one other than Google seems to want to implement this.
- gsnedders 10y agoEveryone wants to implement it (and is implementing it!), with the exception of HTML imports, which are likely going to get dropped from Chrome eventually.
- Zooper 10y agoAre HTML imports not saved by widespread http2 adoption, where the imported pages are pushed to the client upon initial page request? No reason to throw it out completely.
- dmitriid 10y agoThey are killed by ES6 import spec. So, "declarative custom components" have fully devolved into "JS-only framework that pretends to be DOM and adds weird limitations"
- gsnedders 10y agoIt's not quite so clear cut, AFAIK, rather wanting to wait and see how ES6 imports end up getting used rather than speccing and implementing something similar for HTML imports.