How do Meteor's blaze and Famo.us play together?

后端 未结 5 1626
[愿得一人]
[愿得一人] 2021-02-02 00:48

2 Technologies:

  • Meteor with the blaze templating engine
  • Famo.us with their awesome gui framework

I come from the meteor side, I personally

5条回答
  •  清歌不尽
    2021-02-02 01:34

    I just released a preview of famous-components, which is an attempt at a tight integration between Blaze and Famous. All the other approaches I've seen so far side step most of Blaze, and require writing large amounts of code in JavaScript, which felt very unnatural to me in Meteor. Meteor code should be small, concise and easy with powerful results. Here are a few examples of what it looks like: (each template forms a renderNode, any HTML gets put on a Surface. Modifiers/views/options are specified as a component attributes)

    
    

    Scrollview (can be split into sub templates):

    
    
    Template.famousInit.items = function() { return Items.find() };
    

    Events:

    Template.blockSpring.events({
      'click': function(event, tpl) {
        var fview = FView.fromTemplate(tpl);
        fview.modifier.setTransform(
          Transform.translate(Math.random()*500,Math.random()*300),
          springTransition
        );
      }
    });
    

    It also works out the box with iron-router. More details, docs, live demos, all at http://famous-views.meteor.com/

提交回复
热议问题