Live data from Hacker News

An Introduction to Polymer - A Web Component Library

wearenorthern.com

41–50 of 56 posts

Re: An Introduction to Polymer - A Web Component Library

#42
post #6

This framework seems very interesting, I wonder why it didn't become popular outside of Google

For a while there in the .5 to .8 days performance was pretty iffy, and the documentation was lacking (as was expected for a library pre-1.0), but it seemed that was when a lot of bloggers picked it up, compared it to react/angular, then dropped it. And back then when I was trying it out there wasn't any easy way to integrate webpack (or something like it) which made it difficult as I've gotten very used to a good bu…

I've found it's still pretty difficult to integrate with Webpack because pretty much all of the components use bower instead of npm. I've been having success with https://github.com/aitoroses/vulcanize-loader although re-running vulcanize every time components change is not fast, and I can't get it to work with Hot Module Reloading. Maybe the Webpack story will get better with Polymer 2.0

Re: An Introduction to Polymer - A Web Component Library

#43
post #39

I've used Polymer for about a year now, and it's not my favorite. Two way data binding yields bad design, and stack traces are incredibly opaque (they go through polymer guts). That means debugging is an absolute nightmare (I come from strongly typed closure javascript, so this was a punch in the face). If your HTML has problems, the browser won't yell at you; debugging tools are just plainly lacking. There's a reaso…

Also, using the two way binding is optional. We've been using Polymer for about the same time with Redux and a unidirectional data flow. I'm very happy with it.

@nverba Hoi mate, Any pointers about using redux with polymer? I have been using polymer for some eight months now. I tried to implement redux in one of my components a couple of months back. But I couldn't finish it, because of the humongous refactoring work.

Re: An Introduction to Polymer - A Web Component Library

#44
I have been working on polymer based projects for some time(8 months).

My opinion is that, polymer is good for specific use cases such as- Creating leaf level components, Reusing components around multiple projects.

BUT....

Building complete applications in Polymer has been a painful experience

I have at times encountered critical 'library bugs', which haven't been fixed yet, we had to use hacky workarounds and forked repos with fixes. Check 'p1-backlog' in github

Less control over elements because of two-way-data binding, I guess I should use redux with it. But I'm still a bit confused about certain aspects of adding redux into the mix

The application end up really heavy

I wish I had a bit more control over vulcanize

Re: An Introduction to Polymer - A Web Component Library

#45

I've used Polymer for about a year now, and it's not my favorite. Two way data binding yields bad design, and stack traces are incredibly opaque (they go through polymer guts). That means debugging is an absolute nightmare (I come from strongly typed closure javascript, so this was a punch in the face). If your HTML has problems, the browser won't yell at you; debugging tools are just plainly lacking. There's a reaso…

I've had very similar experience with Angular 1.x where a lot of problems can be avoided by having a sensible styleguide/standard across the entire team. I've since moved to using React and couldn't be happier :)

Re: An Introduction to Polymer - A Web Component Library

#46
post #39

Earlier quoted context omitted.

Also, using the two way binding is optional. We've been using Polymer for about the same time with Redux and a unidirectional data flow. I'm very happy with it.

@nverba Hoi mate, Any pointers about using redux with polymer? I have been using polymer for some eight months now. I tried to implement redux in one of my components a couple of months back. But I couldn't finish it, because of the humongous refactoring work.

You can check out polymer-redux (https://github.com/tur-nr/polymer-redux). It's makes it easy to integrate the redux store inside your components. Basically you will split up your components in two types: 1.) container components that are redux aware and subscribes to slices of your state graph and pure presentational components that are unaware of redux and are management by the container components. This is similar to what is suggested in React/Redux. This way you can re-use your presentational components elsewhere.

Check also this guide: https://medium.com/@dan_abramov/smart-and-dumb-components-7c...

Re: An Introduction to Polymer - A Web Component Library

#47

I've used Polymer for about a year now, and it's not my favorite. Two way data binding yields bad design, and stack traces are incredibly opaque (they go through polymer guts). That means debugging is an absolute nightmare (I come from strongly typed closure javascript, so this was a punch in the face). If your HTML has problems, the browser won't yell at you; debugging tools are just plainly lacking. There's a reaso…

I'm a big fan of the two-way data binding in Angular (though you do need to be aware of its limits), and I'd gotten the impression that Polymer was a bit of a spiritual successor to Angular. Any opinions on how the two compare?

Re: An Introduction to Polymer - A Web Component Library

#48

I have recently decided to switch from Polymer to Material2 for the following reasons: - Polymer is only available through bower, which means I have to teach 2 package management systems to my developers. - The documentation is not great (for instance, events are documented in camelCase, but must be listened for in Angular 2 using dashes-between-words). - There are serious issues [0] which not gone resolved for a lon…

you serious issue IS merged https://github.com/webcomponents/webcomponentsjs/pull/644 ;-)

Also its NOT polymer issue - it is polyfill issue. It affects things like x-tag,bosonic and others. ANyways it looks like latest release is the fixed version.

Re: An Introduction to Polymer - A Web Component Library

#49
post #10

Earlier quoted context omitted.

I think it's mostly due to browser support and developer awareness of Web Components. Chrome has native support (of course) for the four main technologies needed for Web Components, but other browsers are starting to catch on. In the meantime you need a few Polyfills to get full support, which is not ideal. The support graph is starting to look a lot better, though: https://jonrimmer.github.io/are-we-componentized-ye…

Sure, but look at it this way - with other solutions like lets say React their virtual dom is your "polyfill". Even with polyfills polymer is MUCH smaller than react core ;-) I don't see it as a problem as I've created elements that worked in IE10+ with it.

React's virtual DOM has a far smaller performance impact than the web components polyfills have...

Re: An Introduction to Polymer - A Web Component Library

#50
post #21
post #19

Earlier quoted context omitted.

I first looked at Polymer quite awhile ago, maybe over a year. I guess I kind of thought it was a stepping stone to Angular 2 which uses a component model, like most of the other latest frameworks. Or that maybe it was some kind of special one-off project at Google. Once I stumbled onto Angular Material I sort of forgot about Polymer because I didn't have a dedicated UI guy, and there was a nice cache of controls to…

Some potentially relevant links for you... 1: https://beta.webcomponents.org/ - A public repository of web components (including the official Polymer components and community components). 2: https://polymer-slack.herokuapp.com/ - Join the Polymer community on Slack. All of the core team members are there as well :)

Thanks, I always thought it was a slick project. It was maybe just above my skill-set when I first encountered it, as I was still getting familiar with angular. If it's going to continue to be around for awhile, I want to give it another shot.
Post reply on HN