Live data from Hacker News

Ask HN: Should I use Polymer for my next project?

news.ycombinator.com

31–40 of 82 posts

Re: Ask HN: Should I use Polymer for my next project?

#31
post #6

Earlier quoted context omitted.

If you keep everything external it works fine. We have a large project in Polymer, and we use CoffeeScript and Sass, with no problem.

got an example? I've not seen any decent 'assembly' tools that pull all the bits together (ie. specifically post compile, turning your separate elements into one self contained .html include)

Well we haven't implemented it yet, but we use Gulp. So my plan is to just concat everything together. I've read there's a syntax for defining resources inside html files, which is probably what we're going to do.

Re: Ask HN: Should I use Polymer for my next project?

#33
My plan: go all in on Angular (wish it were Ember or Backbone) through 2015. These frameworks have reached a maturity and popularity that makes them useful and reliable. I expect to switch to Polymer / Web Components early 2016. I work at a very large company. I think it makes sense for us to stay in the "late majority" because most benefits come for technology adopters after the trail has not only been blazed but has been thoroughly paved and landscaped by others. There may be competitive advantages however to individual developers and smaller organizations (startups) who can pioneer the new.

Re: Ask HN: Should I use Polymer for my next project?

#34

The Polymer website uses Polymer and it is slooooow. That's a huge red flag to me. I have nothing but good things to say about React. Try that instead.

Slow UI or slow loading? Slow loading is due to all the HTML imports generating HTTP requests. This can be optimised by inlining the web-components, using a tool like https://github.com/Polymer/vulcanize

I'm not sure why the polymer website is not optimised like this.

[edit]

Here's what vulcanize does: http://polymer-twitter.badsyntax.co:8002/build.html (Code here: https://github.com/badsyntax/polymer-twitter)

Concatting styles is a whole different story, conceptually it doesn't fit in with encapsulated compontents.

Re: Ask HN: Should I use Polymer for my next project?

#36
post #34

The Polymer website uses Polymer and it is slooooow. That's a huge red flag to me. I have nothing but good things to say about React. Try that instead.

Slow UI or slow loading? Slow loading is due to all the HTML imports generating HTTP requests. This can be optimised by inlining the web-components, using a tool like https://github.com/Polymer/vulcanize I'm not sure why the polymer website is not optimised like this. [edit] Here's what vulcanize does: http://polymer-twitter.badsyntax.co:8002/build.html (Code here: https://github.com/badsyntax/polymer-twitter ) Conca…

For me, on Firefox 30, I can see the basic structure of the page immediately, then my browser freezes for ~1.5 seconds, and I see the rest. I checked out the front page in FF's devtools, and could only see two uncached network requests, both to youtube.com. So I am assuming that Polymer itself isn't hitting the network. Furthermore AJAX doesn't freeze the browser, so I can only conclude that it's the actual JS that is causing that lag.

On Chrome 35 the freeze is for a much smaller duration but I can still feel it.

I'm currently on my (fairly beefy) desktop, so I imagine it's even more noticeable on an older laptop or phone.

EDIT: indeed, from a cold cache, it's even slower, and wow there are a lot of HTTP requests.

Re: Ask HN: Should I use Polymer for my next project?

#37

The only reason to use polymer is if you need the L style UIs they discussed at Google I/O. While Google's really good at Java apis, they're really terrible at JS apis. I love Google, but I would be very hesitant to use their JavaScript libraries or frameworks. A lot of people I've talked to (on irc, es-discus, etc.) don't agree with web components, but Google's pushing it hard. Web components are poorly based good i…

I think you're confounding Polymer with Paper. The core Polymer elements that have currently been released make no assumption as to your UI preference, which means you can style them individually as you please.

I've been creating my own Polymer elements for an internal project and have been pleased with the result so far. We've got some particular branding requirements that I've been able to reproduce to great effect. I think as long as you stay away from the messy parts of Polymer (such as making XHR requests in the DOM) then you may find the experience more agreeable.

Re: Ask HN: Should I use Polymer for my next project?

#38

I really liked the Polymer demos from I/O, but stepping back, it seems an awful lot like React without the compatibility. Polymer does appear to be more than just another Google flash-in-the-pan. They've got a good team, which is working closely with the Chrome team and Google's investment at I/O was significant. I wonder how the Angular folks are feeling. Facebook is using React right now, when will Google put Polym…

Perhaps the biggest concern right now is vendor buy-in from other browser vendors such as Microsoft and Apple. It appears that React, at least for the time being, is a more immediate and practical approach to composing UIs.

I'll still be mixing Polymer into internal/side projects to keep up to date on its status, but I don't think I'll be pushing anything public facing for the foreseeable future.

Re: Ask HN: Should I use Polymer for my next project?

#39
One important question: Do you need to ship something right now?

If so, its important to keep in mind that Polymer is in a "developer preview" state, and we have not declared it production ready yet.

If you need to ship, then use whatever you feel the most comfortable with. Fewer cognitive barriers and less stress.

However, if you've got the time to play around and learn how web components work, then hop aboard!

There's an introduction tutorial here: http://www.polymer-project.org/docs/start/tutorial/intro.htm...

The calculator demo is pretty simple: http://www.polymer-project.org/components/paper-calculator/d... (source: https://github.com/polymer/paper-calculator)

Salesforce has a nice polymer-based web component set for building mobile apps that integrate with the Salesforce apis: https://github.com/ForceDotComLabs/mobile-ui-elements/

And the demo app at I/O is here: http://www.polymer-project.org/apps/topeka/ (source: https://github.com/polymer/topeka/ and https://github.com/polymer/topeka-elements)

Re: Ask HN: Should I use Polymer for my next project?

#40

One important question: Do you need to ship something right now? If so, its important to keep in mind that Polymer is in a "developer preview" state, and we have not declared it production ready yet. If you need to ship, then use whatever you feel the most comfortable with. Fewer cognitive barriers and less stress. However, if you've got the time to play around and learn how web components work, then hop aboard! Ther…

That's consistent with what we've been hearing from Matt, but I believe contrary to how Rob answered a similar question at I/O.

Do you guys have a timeline for this, e.g. "try it for production-quality apps that are scheduled to ship Fall 2014"?

Post reply on HN