by LukeFitzpatrick on 5/8/16, 12:29 PM with 77 comments
by sshumaker on 5/8/16, 2:37 PM
Some downsides: Performance is not great. Lack of coherent data architecture (e.g. Redux). Difficult to manage state change (as opposed to React) due to a more limited programming model - e.g. template ifs and repeats don't know to reevaluate in many cases. This makes it harder to integrate with third party js libraries. Inferior tooling vs React.
Philosophically Polymer is more about the DOM and React is more JS-focused. Some of this is personal preference.
by david-given on 5/8/16, 1:53 PM
Polymer is made of magic. It uses magic cutting-edge browser features where available, and where they aren't it fakes them using magic. Some of its APIs like Polymer.dom(x) are completely magic. When it works, it works really well. When it doesn't you are going to waste so much time trying to find out why.
It also assumes that everything you're doing is through Polymer; so you won't get much mileage out of, say, JQuery. While it admits the existence of other Javascript libraries it tends to blank them at parties.
If I were to do my current project again... I'd probably still choose Polymer, although I'd take another look at the other Javascript UI toolkits. Web components are so, so nice for designing UIs --- I can finally use actual computer science techniques like abstraction and modularity for building UIs! --- and it's got the best consistent look and feel that I've ever seen in a Javascript UI toolkit.
by eob on 5/8/16, 2:35 PM
A few commenters mentioned poor browser support, but we haven't experienced any problems other than IE<=10.
In many ways Polymer is just a shim for the WebComponents spec with data binding added in, along with a standard library of web components. The resulting framework-style is basically plain-JS/HTML with a la carte use of Web Components where appropriate. Unlike [my perception of] React or Angular, you can use Polymer a bit without going all in. (Ironically the one thing you can't currently do is mix Polymer Elements from Source A with Polymer Elements from Source B at runtime if they have common, but separately hosted, dependencies).
WebComponents feel a bit like Java swing, in that making HelloWorld is high overhead, but once you've got a nice toolbox of components going, you can pull them out and use them flexibly. This is not unlike React components, except Polymer/WebComponents use an HTML-centric definition format while React uses a JS-centric definition format.
by pfooti on 5/8/16, 3:17 PM
That means without shimming other libraries, polymer is incompatible with any other libraries you might use to manipulate the DOM. For example, you can't easily mix angular, react, or ember templates with some polymer elements, because (e.g.,) angular's ng-if directive doesn't use polymer.dom to inject created nodes.
This is currently my biggest beef with polymer. Someday, webcomponents will be great, principally due to composability and portability. Just plug the one component you need in to your extant work. But for now, that promise is not quite realized.
[0]: https://www.polymer-project.org/1.0/docs/devguide/local-dom....
by appleflaxen on 5/8/16, 2:29 PM
by IshKebab on 5/8/16, 2:56 PM
Also it is over-complicated for simple websites. You'll end up in bower-npm-grunt-etc-etc hell very quickly.
by lucb1e on 5/8/16, 1:51 PM
by dccoolgai on 5/8/16, 1:49 PM
by dominotw on 5/8/16, 1:39 PM
lacks older browser support
mixing it with other virtual-dom libraries like react is not easy or straightforward.
by etimberg on 5/8/16, 2:51 PM
Vulcanize is pretty cool, though we had a hard time getting it to work right in a gulp workflow.
by arisAlexis on 5/8/16, 2:29 PM
by wanda on 5/8/16, 3:13 PM
I've got a project in the pipeline for which I was planning to use Cycle.js, but I've always had a niggling interest in Polymer.
What I'd like to know is whether Polymer offers any significant pros, because after consuming some of the docs the offer seems to be a better reimagining of ASP.NET WebForms. What are the benefits?
by sidcool on 5/8/16, 7:51 PM
by kolar on 5/9/16, 6:14 AM
by elcritch on 5/8/16, 7:23 PM
by andreapaiola on 5/8/16, 1:46 PM
by andreapaiola on 5/9/16, 5:20 AM
by vayarajesh on 5/8/16, 1:48 PM