Ask HN: Should I use Polymer for my next project?
I have been planning to use polymer for next project for frontend and rails on server. I have read the article posted here https://news.ycombinator.com/item?id=7970781 I am still noticing that polymer is slow on FF,Safari etc(almost freezes for 2 secs). However works great on chrome.
Project would be mobile first web app(or may be mobile only). I am also considering Phonegap along with polymer. Is it a good idea to use phonegap? Is it going slow down even further?
Google I/O talks highly about but I don't see much improvement in performance and also I am doubtful if the eco system is mature enough to consider it to ship a product in next 2 months or so?
10 comments
[ 3.1 ms ] story [ 37.8 ms ] threadThe main two draws of Polymer are that it's built on web components (which are cool and futuristic) and that it implements material design (which is nice looking). There are other material design widget libraries however, even ones made by Google. Have you seen MDL (http://www.getmdl.io/)? It's a more minimalistic CSS/Javascript approach and will probably be faster and more cross compatible.
FWIW the three things you mentioned (Polymer, Angular, React) are kind of dissimilar in an apple-to-oranges way:
* Polymer is basically a UI widget library with some other bits thrown in - it doesn't really help you structure your application, it's just widgets for building the view layer.
* Angular is a full-ish MVC platform that provides you with tools to build your own UI components/widgets
* React is just a toolkit for building UI components, and it doesn't come with anything else (but it does encourage a kind of design where you don't need much else)
Neither of the latter two come with pre-built widgets: you have to make them yourself or find libraries of them made by others (which is pretty easy to do).
For my money, your expectation on which of these is easy to pick up is backwards: Angular is way, way more complex than React and has a much higher learning curve. React does basically one thing (and does it very well) so there's really not much to learn about it at all - you can pick it up in a day once you wrap your head around the rendering-as-a-pure-function-of-state concept. Angular is a full framework and it does a lot of things and is opinionated about how it does them, so there's a whole lot more to learn. If you need all that MVC stuff done for you, Angular might be the way to go though (but beware the coming 2.0 transition that's going to break all backwards compatibility completely).
I personally like React a lot - I'm probably going to try to wrap MDL components in React for a project I'm working on right now.
I think you are right, Team is thinking in similar lines. Thanks.
[1] http://caniuse.com/#feat=imports
Second, is this a big project with lots of transitively dependencies? Like ES6 modules, HTML imports encourages more granular files that can be referenced and loaded individually. With HTTP/1 this can cause slowdowns as you hit the browser's request limit. HTTP/2 loads a bunch of small files significantly faster. For production we recommend the `vulcanize` tool which concatenates all HTML imports into one file for fast loading.
If you are using 1.0, do you have an example that shows the 2 second freeze? That shouldn't be happening.