Meteor Polymer Elements

For those wondering how to operate polymer and meteor, a different approach is by integrating Meteor in Polymer rather than trying to operate Polymer in Meteor.
This is a change in philosophy because it is very different from what is offered with Blaze / React / Angular.

Why ?

  • Polymer and Web elements are powerful, and more than only material widgets. We don’t want to break the way Polymer works.
  • Meteor has all the tools that enable integration.

The idea is to create meteor elements that will be used in polymer to enjoy the magic of Meteor : DDP, methods, packages …

<meteor-collection name="peoples" on-insert="_onInsert">
  <meteor-query query='{ "age": 18 }' options='{"sort": { size: -1 } }' data="{{eighties}}"></meteor-query>
</meteor-collection>

<template is="dom-repeat" items="{{eighties}}">
  <div>
    <span>{{item.name}}</span>
  </div>
</template>

So we’ve created some basics elements to integrate Meteor in Polymer and build an helper package called polymer-meteor-elements that can install dependencies and do vulcanize stuff

You’ll find polymer-meteor-elements Meteor package here :

And a leaderboard rewrite with this package here :

thank you for your future contributions

3 Likes

Polymer meteor elements documentation is available here :

https://pixto.github.io/polymer-meteor-elements/meteor-elements/

Very good approach, I’ve been thinking of doing something along the lines of this myself. Will definitely look into this and contribute if we see it works for us! We’re rewriting our backend right now so I’m sure we can give you some feedback or even contribute to the repo :slight_smile:

We should have some discussion how we can get rid of BlazeLayout/Blaze & jQuery and having something like PolymerRouter/PolymerLayout instead. Do you already have some ideas for this or some prototypes?

For now we have two approaches

  • this package that enable all Meteor stuff including Blaze, etc … ( a transition way )
  • and a complete Meteor UI logic removal with Polymor :
    https://github.com/atoy40/meteor-polymor
    Both are in early development but it’s just a way to include Polymer in a Meteor project (no revolution there :smiley: )
    the common part is meteor-elements