Hacker News new | ask | show | jobs
by yathern 3477 days ago
I've been using Polymer since 0.5 for a number of personal projects as well as professional.

I have to say it's been a pleasure to use - coming from Angular 1.0. I like it has a very low barrier to entry, having only one real concept; Web Components.

Polymer gives you Data Binding and a few nice things on top of that, but for the most part, you're writing things fairly vanilla.

It's definitely not without it's problems. Element inheritence doesn't really exist in 1.X unless you use Behaviors. There's no inline expression support in bindings. This is partially good because it forces you to keep logic in your javascript, where it belongs. But it also means you sometimes have to be more verbose in obvious places:

   <span hidden$='[[thingsAreEqual(a,b)]]>They are not equal</span>
vs

   <span hidden$='[[a==b]]'>They are not equal</span>
But even still, I've been able to be very productive with it, and enjoy using it thoroughly. Feel free to ask me about my experience.
3 comments

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 work with. I'd consider looking into Polymer again if I see a some good demos in the PolymerElements, and if it seems like there's a roadmap with an active community. I'm always impressed with Google Play Music.
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.
> Once I stumbled onto Angular Material I sort of forgot about Polymer because I didn't have a dedicated UI guy

That is kind of funny - because it looks like polymer has much more complete Material UI implementation compared to both Angulars (unless they catched up on that).

The idea of Polymer/Web Components appeals to me as a backend developer who has a little experience with JS and Angular 1. Can you tell me a little about how you've used it professionally and what you thought? I.e. scale, scalability, maintainability, encapsulation. I've read a little about Polymer but I haven't spent enough time to grok it. Note: consider me a novice as far as front end goes.
Yeah that's a nice/bad thing about Polymer: how vanilla it is. 2.0 is even more vanilla. But the mantra is to #UseThePlatform and so that's what they do. The platform is becoming less burdensome than it used to be. Because of how isolated Web Components are it keeps things simple, particularly when you're dealing with DOM. Components tend to keep to themselves and interact with each other via your agreed-upon interfaces.

I also noticed the verboseness. On the projects I worked on at Google I had just made a Behavior of logic utilities that I added to components that needed that kind of behavior. So they could inherit some utilities like `_equalTo`. It wasn't ideal but it did stop the need to define essentially the same functions across multiple components.