Hacker News new | ask | show | jobs
by visionscaper 3480 days ago
A few months ago I started working on a large web application that is being implemented with Polymer. A few take a ways that are top of mind:

1) Very easy to learn, but it has no idiomatic way to write large applications; it is not a framework like Angular or Ember.js. What the best way is to write large, maintainable, applications with Polymer is still open IMHO.

A potentially useful way to structure large Polymer based applications is to combine Polymer and Redux, separating presentation code from state/business logic.

2) No idiomatic way to do dependency injection. In Polymer even services are stated declaratively in HTML (e.g. `<my-service data={{resourceData}}></my-service>`). Because of this, there is no natural way to replace my-service with, for instance, a stubbed version for testing purposes. There are some solutions, but they are somewhat laborious [1].

3) Build process still buggy. We encountered multiple issues with the polymer-vulcanize library.

Looking back at the ease with which I started writing application code using Polymer I foresee a great future for this library, especially for smaller applications. We need to learn more best practices in order to use Polymer to create large maintainable applications.

[1] “Polymer - Dependency Injection with Custom Elements by Justin Fagnani” https://www.youtube.com/watch?v=6o5zaKHedTE

1 comments

Exactly this. I think some of the tutorials and introductions were a bit overwhelming with their huge dependency lists (see Polymer catalogue), and a lot of opinionated ideas about how to form a Polymer application. Core Polymer is so easy to pick up and flexible. It's been a joy to work with. Well ok, there's a few gotchas, and the build process if you're mostly rolling your own can be a real pain. But once you find your feet with it, everything works pretty well.