Meteor + Polymer

by Ry Walker

UPDATE: We did a talk at Meteor Dev Shop — video below:

Recently at Differential we have been working on a few projects that combine Meteor and Polymer.

What sparked our interest initially was gaining access to a fairly in-depth implementation of Material Design. But as we learned about Polymer, we became interested in learning about the possible future of web development if the Web Components specs take hold.

We’re using Polymer on three projects presently:

What has us excited about Polymer + Web Components?

  • Material Design = less design work (a better Twitter Bootstrap)
  • Promise of native support within browsers (web components are a HTML5 standard).
  • The next level of modularity — Meteor packages are awesome, but require Meteor projects to consume them. What if we can build components that can be used in ANY web app by just importing the HTML file and using the right HTML tags.

Integration concerns

It’s been fairly easy to use both Meteor + Polymer within an app. Here are the sticky points we’ve discovered so far:

  • Too many HTTP requests without Vulcanize (Can be overcome with our `differential:vulcanize` package.)
  • Double curly clash between Meteor and Polymer (Can be overcome by using html imports, so Blaze does not attempt to compile them.)

Some cons/risks

  • Browser support — if you’re building a native mobile app, this is moot
  • Extra CSS for Safari — not tricky, just tedious, hopefully goes away
  • Bleeding edge — pre 1.0 — possible breaking changes — Meteor dev should be OK with this
  • Will the other browser vendors get on board?

Sample code

Bonus link

  • If you’re looking for the monq-based background job code from our Meteor Dev Shop talk “Meteor + Polymer”, check out `differential:workers` package.

Share Share on Twitter Share on Facebook Share on LinkedIn

How Can We Help?

Reaching out doesn’t mean you’re ready to start a project, but we’d love to learn more about the challenge you’re facing, answer any questions, and see if we might be a good fit for working together.

Contact Us