Live data from Hacker News

Material design with Polymer

polymer-project.org

11–20 of 47 posts

Re: Material design with Polymer

#14
post #10

Where does Polymer stand in relation to React.js from Facebook?

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 mechanism (eventually Object.observe if they're not using that already, I haven't looked at their code in a couple months).

When you write code for React, on the other hand, you basically pretend the DOM is stateless and write your code as if you're writing server side templating code and rendering the entire page from scratch. The framework takes the data structure that the render process builds and efficiently forces the DOM to match what was rendered. At least that's the central concept. There are plenty of caveats.

If anybody has more specific questions, I'm happy to answer them.

Re: Material design with Polymer

#15
I was kind of confused as to the organization of the repos and how this is all brought together. Is there a document somewhere explaining the relationship (hierarchy) of all the repos and what role each plays in the larger polymer material project?

Specifically, where is the code that does the layout for this? I want to see how they are doing the positioning of elements in space. Is it all CSS classes or do they do positioning with javascript?

Re: Material design with Polymer

#16
post #10

Where does Polymer stand in relation to React.js from Facebook?

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...)

Re: Material design with Polymer

#17
On one hand, I worry that Google is monopolizing the future of the web, but on another, I'm glad because they are effective at producing the features that us developers want.

I have mixed feelings about Polymer, currently its high browser requirements make it too radical to use at work (IE, Firefox & Safari be broken yo), but forward enough to get me experimenting with it on my personal projects. At the workplace, I'll continue to stick to React.

Re: Material design with Polymer

#18
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...)

Mixing them both together would be nasty (components are central to both APIs, it'd be counterintuitive), but using React as a fallback layer doesn't sounds so bad
Post reply on HN