Live data from Hacker News

Material design with Polymer

polymer-project.org

21–30 of 47 posts

Re: Material design with Polymer

#22
"Material design with Polymer" I thought the headline was about a materials design startup, not a UI library. Can you please add more unrelated jargon and nonsensical analogies from random fields to your documentation?

Re: Material design with Polymer

#23
post #16

Earlier quoted context omitted.

They're only similar in that they're both for building component based DOM UI. Polymer is tied into the WebComponents standardization effort (also driven by google-related people). Pieces of the DOM are managed by relatively small, contained objects that maintain their own internal state and keep the DOM in sync. It achieves component state synchronization via data binding like Angular or Ember and some sort of KVO m…

Is it feasible to use react.js and polymer together in an app? I mean, is it possible to do this without sacrificing the benefits of reactjs by simply writing state-ish code in reactjs? (At first blush, I can't think of a sensible way of doing this...)

Haven't tried it but you can integrate React with pretty much anything. Looking at the Polymer lifecycle methods[1], I'd start by trying a `React.renderComponent` in Polymer's `domReady` callback for an element and then setState/setProps/forceUpdate in the `attributeChanged` callback.

[1] http://www.polymer-project.org/docs/polymer/polymer.html#lif...

That said, I don't expect it to be common since you'd basically be building a React component with a Polymer shim and getting almost no leverage out of Polymer. I suppose you could write some code to parse out the html template and turn it into React.DOM equivalents but that seems like a lot of effort.

All React integrations I've seen are the result of introducing React into a legacy codebase or they're using React on a component that's rendering a very large DOM subtree and taking advantage of React's O(N_view) instead of O(N_model) scaling and batched updates for perf wins over current KVO techniques.

Re: Material design with Polymer

#24
post #4

Earlier quoted context omitted.

Also the elements themselves don't render properly in FF24 (work mandated): http://imgur.com/AyactvC

Doesn't work properly in FF30 either.

WebComponent support seems to be super spotty across browsers. But that being said, it's an incredibly exciting extension to HTML so really cool that Google's invested the time to flesh out what a WC-based widget library might look like.

Re: Material design with Polymer

#25
post #16

Earlier quoted context omitted.

Is it feasible to use react.js and polymer together in an app? I mean, is it possible to do this without sacrificing the benefits of reactjs by simply writing state-ish code in reactjs? (At first blush, I can't think of a sensible way of doing this...)

Haven't tried it but you can integrate React with pretty much anything. Looking at the Polymer lifecycle methods[1], I'd start by trying a `React.renderComponent` in Polymer's `domReady` callback for an element and then setState/setProps/forceUpdate in the `attributeChanged` callback. [1] http://www.polymer-project.org/docs/polymer/polymer.html#lif... That said, I don't expect it to be common since you'd basically be…

Yeah, what I'd want is the polymer "look and feel" and the react update model... doesn't seem like that's possible.

Re: Material design with Polymer

#28
post #25

Earlier quoted context omitted.

Haven't tried it but you can integrate React with pretty much anything. Looking at the Polymer lifecycle methods[1], I'd start by trying a `React.renderComponent` in Polymer's `domReady` callback for an element and then setState/setProps/forceUpdate in the `attributeChanged` callback. [1] http://www.polymer-project.org/docs/polymer/polymer.html#lif... That said, I don't expect it to be common since you'd basically be…

Yeah, what I'd want is the polymer "look and feel" and the react update model... doesn't seem like that's possible.

That's not really doable. I'm building a React based component/widget system for work and assuming all goes well and I can OSS it there's a reasonable chance I'll build out a Material/Paper widget set since I really like this set of design guidelines.

Re: Material design with Polymer

#30
post #21

In Polymer ajax is an element: https://github.com/PolymerLabs/polymer-ajax/blob/master/test...

What a strange strange choice. Instead of moving responsibilities to a imperfect but very flexible turing-complete language (javascript), they are trying to shoehorn everything into a markup language originally designed as an abstraction for documents (html).

I liked a lot of what I saw in the project, but this "ajax as an element" makes me want to facepalm, or at least scratch my head and wonder "why?!?"

Can someone from the polymer team elaborate the reasoning behind this?

Post reply on HN