Announcing blaze-rc0! Meteor's new UI engine -- ready for use.

2,113 views
Skip to first unread message

Avital Oliver

unread,
Feb 27, 2014, 11:02:09 PM2/27/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Good evening,

I'm extremely excited to announce that after a very long journey we're finally preparing to release Blaze, a complete rewrite of our live page updating engine. And a special shout-out to everyone who's been running their apps on our preview releases and all of the great feedback we've gotten.

Meteor 0.8.0 will completely eliminate Spark and replace it with Blaze. The APIs for the release are frozen -- now's the time to port your apps and packages.

Run your apps against the new "blaze-rc0" release. To do this, run `meteor update --release blaze-rc0` inside your app's directory. Many apps need very little porting. For apps or packages that use certain advanced APIs, there's a comprehensive guide.

If you find bugs, report them according to our guidelines (with a minimal reproduction app as a git clone-able repository).

If you have trouble getting your app or package to run on Blaze, post your questions on meteor-talk (as new threads).

Massive Cheers,
Avital.

Phil Cockfield

unread,
Feb 28, 2014, 12:13:12 AM2/28/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Congratulations guys!  And on first blush, it's not breaking anything of our existing UI.  <Big Grin>

Really looking forward to working with these new API's.  Great work Meteor DB!!!!

Gadi Cohen

unread,
Feb 28, 2014, 2:55:40 AM2/28/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Yes, yes, yes!!!  Been waiting for another frozen release for a while :)  This is super exciting!  This release, alongside the improvements in 0.7.1, are massive indications of how Meteor has matured, and is both extremely comforting and exciting for startups who took the risk to get on the Meteor train early.  Looking very forward to 0.8... Meteor 1.0 is clearly on the visible horizon now!

For those who missed Chris' email last night (or didn't read it in it's entirety), I'm summarizing what's involved for Iron-Router integration using meteorite:

1. Upgrade Meteor as above:

    meteor update --release blaze-rc0

2. Edit smart.json as follows (in the 'packages' section):

    "iron-router": {
      "branch": "blaze-integration"
    }

3. Add Blaze-Layout to your project (more info about it on github):

    mrt add blaze-layout

Disclaimer: I have no official involvement in Iron-Router / Blaze-Layout, but these steps worked for me and Chris will correct me if I've said anything wrong.  I'm sure many are as impatient as I have been to continue developing with this combo, and can confirm that the above steps work fine with several of my existing site with only very minor changes (API changes from template-engine-preview-10.1).  Check out the Blaze-Layout page for more info on how to exploit the new engine, but this is not required for a fast start.

Note 2: The above packages all mention Meteor's shark branch, but since rc0 is based on that code, and is frozen, I think it's a safe bet.

Gadi

Gadi Cohen

unread,
Feb 28, 2014, 3:22:36 AM2/28/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Uh, also, it may not have been adequately implied from the excitement in my message, but a massive thank you to Chris Mather too for all his work on getting Iron-Router ready for Blaze.  It's no easy feat developing against a branch that is unfinished and constantly changing, and Chris has spent much appreciated time both getting Iron Router to work with Blaze, and leverage it's new features.  One of the obvious advantages is the power we know from Iron Router now only updating the DOM where/when absolutely necessary.  So thank you, Chris, the other contributors, and obviously also Avital and his colleagues, for helping us together reach this massive milestone for the UI side of Meteor!

Ry Walker

unread,
Feb 28, 2014, 3:35:39 AM2/28/14
to meteo...@googlegroups.com
Gadi thanks for your writeup — I can confirm that iron-router/blaze-integration and blaze-layout are working with blaze-rc0.

Got stuck on how to get header/footer working again, for a few minutes, figured this out...

  {{> yield region="header"}}
  {{> yield}}
  {{> yield region="footer"}}

Also had some problems with handlebars-server but got that figured out w/ Chris' help.

We'll have some work now getting all our packages (meteor-boilerplate, accounts-entry, meteor-profile, meteor-blog, etc.) working with meteor-blaze and iron-router-blaze, but this is the day we've been eagerly waiting for, and it won't be very hard.

Great work everyone.

-Ry



--
You received this message because you are subscribed to the Google Groups "meteor-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-talk...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
-Ry

Ry Walker | Partner at Differential | 513.417.2163 | @rywalker | LinkedIn

Morten Henriksen

unread,
Feb 28, 2014, 5:55:00 AM2/28/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Great news!!! 4AM I was half a sleep while watching the devshop (dreaming through the possibilities of solid mobil-ui ground in fame.us + meteor) But Avi you really woke me up with your announcement, no coffee today :) Really happy about Meteor and hitting stable api it's a big thing. Thank you guys!!

Gabriel Pugliese

unread,
Feb 28, 2014, 6:26:41 AM2/28/14
to meteo...@googlegroups.com

Oh yeah baby!!!!!

Gadi Cohen

unread,
Feb 28, 2014, 2:13:15 PM2/28/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Ok, first question :)

Is there anyway to create a helper that can be called as both a regular helper and/or block helper (and still have access to the contents inside the block?).

From my understanding so far, to access the block contents, the helper must be wrapped with UI.block(), which makes it incompatible with a regular helper call (which will throw an Error: Can't call non-function: [object Object]in Spacebars.call).

Thanks

Gadi

On Friday, February 28, 2014 6:02:09 AM UTC+2, Avital Oliver wrote:

Avital Oliver

unread,
Feb 28, 2014, 5:23:46 PM2/28/14
to meteo...@googlegroups.com
Thanks everyone for all the feedback. It's really encouraging to see how excited everyone is. We definitely are!

David Greenspan spent countless hours thinking about every part of the design and implementation of Blaze and I feel happy to have had the opportunity to work with him on getting this released. You should all be thanking him, not me. :)

Chanpory Rith

unread,
Mar 1, 2014, 6:46:20 AM3/1/14
to meteo...@googlegroups.com
Hey all, just spent the last few hours trying to upgrade a project to blaze-rc0. I'm really excited, but some of my helpers seem to have broken. 

Here's a simplified example of the problem that I can't seem to fix:

Template.postInfo.helpers({
  console.log(this);

  postDate: function() {
    var post = Posts.findOne({_id: this._id});
    return post.dateSubmitted;
  }
});

<template name="postItem">
  <div class="post-item">
      {{ postBody }}
      {{> postMeta}}
    </div>
  </div>
</template>

<template name="postMeta">
  <div class="post-meta">
      {{ postDate }}
  </div>
</template>


Before blaze, "this" within Template.postInfo.helpers evaluated to the instance object of postItem. Now it evaluates to the Window object. It seems that the child template (postMeta) can no longer see the parent template's (postItem) data context. Any idea how I can implement the previous behavior?

Chanpory






Avital Oliver

unread,
Mar 1, 2014, 10:03:40 AM3/1/14
to meteo...@googlegroups.com

Hi Chanpory,

Please file a github issue with a complete reproduction (a git clone-able repository, not a code snippet).

Chanpory Rith

unread,
Mar 1, 2014, 11:31:54 AM3/1/14
to meteo...@googlegroups.com
Will do! Wasn't sure if there was something obvious I was missing. Thanks. 

James Wilson

unread,
Mar 1, 2014, 11:49:19 AM3/1/14
to meteo...@googlegroups.com
Are there any sample projects for getting started?

Thanks


James Wilson


--

Chris Mather

unread,
Mar 1, 2014, 12:01:01 PM3/1/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Thanks Gadi, That was a very nice email! I had a lot of fun taking advantage of the new Blaze features in iron-router and blaze-layout. It's not completely done, but pretty close. If anyone wants to chip in to help write tests, documentation, examples, or even API cleanup, please let me know!

Let me take a stab at your question:

The only way to render a template/component is to use the "inclusion" syntax ({{> MyTemplate}}). You cannot access the content/elseContent blocks from a helper. But you can access them from the template/component instance itself. Here's an example:

<template name="MyTemplate">
  {{> content}}
</template>

Template.MyTemplate.init = function () {
  // double check this because I'm writing this email quickly :)
  var content = this.__content;
};

Use the template like this:

{{#MyTemplate}}
 The content goes here
{{/MyTemplate}}

Hope this helps.

Chris

Vincent Jaubert

unread,
Mar 1, 2014, 4:35:47 PM3/1/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Hello, i have a problem with error checking.
I'm struggling with an error with an if block inside a select tag.
I tried to remove one nested feature that was perhaps complicating things.
The problem is that the error message is still relating to this feature that has been removed from my code....

While building the application:
client/lignerdv.html:6: Expected "select" end tag
...this._id}}">         {{else}}         <se...

Problem is that this._id}} is not present anymore in my file....

I will try to force rebuild but i wanted to let you know.

Vincent Jaubert

unread,
Mar 1, 2014, 4:38:49 PM3/1/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Ok, i did rebuild-all, but the error message is still the same.
FYI, lingnerdv.html line 6 is 
<select class="{{#if has_type this}}type_select{{else}}a_remplir type_select{{/if}}">
(actually line 5, since line 6 is empty).

Kelly Copley

unread,
Mar 1, 2014, 11:34:59 PM3/1/14
to meteo...@googlegroups.com, meteo...@googlegroups.com

Gadi Cohen

unread,
Mar 2, 2014, 12:04:08 AM3/2/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Hi Chris.

Thanks for this.

Avital actually answered me in another thread: Blaze: Helpers that can be called both regularly and as a block helper.  Together with Dave, we found a good solution involving a few tricks.  That's good to know about accessing the content through the template's init function though.  Like you, I'm loving learning my way around the new Component API and related functionality :>

Best,
Gadi

Gadi Cohen

unread,
Mar 2, 2014, 12:17:59 AM3/2/14
to meteo...@googlegroups.com, Ja...@jameswilson.name
James, could you be more specific about what kind of samples you're looking for?

In general, apps will be written exactly the same as before.
One big exception is how block helpers work, and rendered() firing just once.  Both of these are discussed in the Using Blaze doc.
Showing off the new SVG capabilities, there's the reactive SVG clock demo, ("meteor --release blaze-rc0 create clock").

For apps leveraging the capabilities of the lower level APIs (I'm guessing this is your main question):
For example of component user and power, see iron-router and particularly it's new blaze-layout engine/plugin.
For a custom template language compiler, see Maxime Quandalle's jade package.

I guess you also meant small code snippets and docs going into the new features.
I agree this would be helpful, and appropriate from MDG now that the API is frozen, but probably less important than getting to a final release (after 0.8.0 I guess).  Until then, it might be up to the early adopters in the community to see what they come up with and post their findings.

Gadi

Gadi Cohen

unread,
Mar 2, 2014, 12:20:41 AM3/2/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Vincent your code actually looks ok (to my understanding, and from what you've posted).  Can you however post the full <select> code up until the final </select>.  My feeling is that there's something else in the middle or otherwise surrounding the closing tag which is creating a unbalanced structure.  Spark was more forgiving with these, since it just spat out HTML in the end... but Spacebars needs to actually have everything clearly defined.

Avi/David: Would you ideally like a new thread for these kinds of questions too, or only larger questions which might warrant more in depth discussion on a particular issue?

Gadi Cohen

unread,
Mar 2, 2014, 12:24:26 AM3/2/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Yeah, you'll get this whenever a helper function doesn't return a value (either because it has no return statement, or a return statement with no value.  e.g. "return" is bad, "return null" is ok).  My initial feeling was that it should just let you return nothing (undefined) as before, but after thinking about it a bit, I think it's a much better pattern for the dev to specifically say "don't render anything", rather wondering why something isn't working as expected.  Unfortunately the error message isn't so helpful in finding the source of the problem... at the moment, you have to work out which pages are failing and review which helpers are being executed on that page.

Avi/David: can we get the filename and line number of the failing helper function?

James Wilson

unread,
Mar 2, 2014, 12:26:56 AM3/2/14
to meteo...@googlegroups.com
thanks for those samples. I also would really value if that awesome template generator i saw supported blaze.




James Wilson




James Wilson

Kelly Copley

unread,
Mar 2, 2014, 1:59:15 AM3/2/14
to meteo...@googlegroups.com
Thanks Gadi! That was a huge help.

Vincent Jaubert

unread,
Mar 2, 2014, 4:40:50 AM3/2/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Le dimanche 2 mars 2014 06:20:41 UTC+1, Gadi Cohen a écrit :
Can you however post the full <select> code up until the final </select>

Gadi, here is the full code

<select class="{{#if has_type this}}type_select{{else}}a_remplir type_select{{/if}}" id="{{this._id}}">

        {{#each types}}

            {{#if is_selected this ../this}}
                <option selected>{{this}}</option>
            {{else}}
                <option>{{this}}</option>
            {{/if}}

        {{/each}}
            </select> 

However, if if remove the whole {{#each}} block and the id={{this._id}}
like that:

            <select class="{{#if has_type this}}type_select{{else}}a_remplir type_select{{/if}}" >
            </select>

Meteor is still complaining and referencing code that is not there anymore :

While building the application:
client/lignerdv.html:6: Expected "select" end tag
...this._id}}">         {{else}}         <se...

Forcing rebuild with rebuild-all didn't cure the error.

Fabian Vogelsteller

unread,
Mar 3, 2014, 6:07:45 AM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
How this works then when a Collection item wasn't found, as this returns "undefined" as well?

Gadi Cohen

unread,
Mar 3, 2014, 8:30:31 AM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Vincent, something weird is going on here.  Your code looks fine, and I even pasted it into a Meteor project and confirmed that it's compiling without error.  Are you absolutely sure the files being read by Meteor are being updated (you mentioned wrong line numbers and old errors even after removing code).  Sometimes weird things like this can happen... can you verify that if you take out that whole section, the error goes away?  And/or try restart Meteor (on a different port), reopen/close your text editor, etc.  Sorry, I know it sounds like a lot, just trying to cover some fringe cases.

Gadi Cohen

unread,
Mar 3, 2014, 8:52:44 AM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
On Monday, March 3, 2014 1:07:45 PM UTC+2, Fabian Vogelsteller wrote:
How this works then when a Collection item wasn't found, as this returns "undefined" as well?

Sorry, I should have been clearer... this is only relevant for helpers being called like {{> helper}}, i.e. the so-called "inclusion function".  So this won't affect a findOne() with no matches.  A helper called in this manner can only return a Template, or null, and I think that's sane (it protects us from situations where we mistype the template name without noticing, or before it was created, etc, and wondering what's going on).

Adrian Lanning

unread,
Mar 3, 2014, 10:42:07 AM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Congrats on the rc!  

Since the 'handlebars' package is being replaced with the 'ui' package, what is the recommended way to maintain backwards compatibility while adding Blaze support to existing smart packages?

Goal is to have one package that can be used regardless of whether the app uses the new Blaze engine or Spark.

The best I have come up with is to have both be weak references in package.js and then in the ui code, manually check for presence:

if ("undefined" !== typeof Handlebars ...

:-(

Tracking this issue here for the meteor-roles package:  https://github.com/alanning/meteor-roles/issues/28

Once we figure this out, it should probably be added to the Blaze conversion guide:

Vincent Jaubert

unread,
Mar 3, 2014, 5:50:55 PM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Since this release is titled "rc", i'm a little worried by the performance regression in comparaison with spark.
A full redraw of my app main window was taking 479ms (mean from ten runs). With blaze, it's taking 990ms (again mean from ten runs), so is 2x slower.
Is it a know issue which will be ultimately fixed ?

David Greenspan

unread,
Mar 3, 2014, 6:45:01 PM3/3/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Hi Vincent,

We're aware that there's some performance regression, but 2x sounds pretty high.  We definitely plan to do some optimization in the coming weeks, but we think it's generally better to get the release out sooner and then continue to optimize.

Are you able to give us access to your app, or a reduced version of it, for performance testing?

Thanks,
David



--
You received this message because you are subscribed to the Google Groups "meteor-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-core...@googlegroups.com.
To post to this group, send email to meteo...@googlegroups.com.
Visit this group at http://groups.google.com/group/meteor-core.

Vincent Jaubert

unread,
Mar 4, 2014, 2:38:42 AM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Le mardi 4 mars 2014 00:45:01 UTC+1, David Greenspan a écrit :
Are you able to give us access to your app, or a reduced version of it, for performance testing?


It's possible, but it will take me a few days, this is a not ready for release private app full of private  data. I will let you know when it's ready.

Tarang Patel

unread,
Mar 4, 2014, 3:15:16 AM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
With the inclusion returning undefined error is there a way of seeing which inclusion is causing it? I'm upgrading an older project and its so difficult to find out what is causing it.

Vincent Jaubert

unread,
Mar 4, 2014, 6:48:05 AM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Is "../this" still working ?

I have such structure :
{{#with obj_selected}}
    {{#each items}}
       {{helper ../this this}}
    {{/each}}
{{/with}}

And corresponding js:

Template.myTemplate.items = ["foo","bar","hello"];  //array of keys

Template.myTemplate.helper = function (a, b) {
    console.log(a) // UNDEFINED !
    console.log(b) // correct item
    return doThingsWith(a,b);
};

As you can see, i get undefined in my helper with ../this passed as a param. This was working under handlebars/spark.



Andreas Gabriel

unread,
Mar 4, 2014, 9:16:34 AM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Just use .. instead of ../this !?

Vincent Jaubert

unread,
Mar 4, 2014, 3:11:33 PM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
I have always used ../this, anyway .. give me the same result, undefined.

David Greenspan

unread,
Mar 4, 2014, 3:23:03 PM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Vincent, that is strange.  Please file a bug (with minimal repro).

Thanks,
David



Vincent Jaubert

unread,
Mar 4, 2014, 6:58:04 PM3/4/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Ok, i have made a reduced version which shows a +80% (a bit less than the 100% of the full version, but interesting anyway i think) displaying time, with included timer.

Please provide me with somewhere to upload it to, and a mail to give you instruction.



Le mardi 4 mars 2014 00:45:01 UTC+1, David Greenspan a écrit :

Gadi Cohen

unread,
Mar 5, 2014, 2:09:48 AM3/5/14
to meteo...@googlegroups.com, meteo...@googlegroups.com
Guys, now that blaze is getting close to core, please address issues/bugs IN SEPARATE THREADS (with prefix Blaze).

This makes things a lot more manageable, rather than a 12 page thread addressing many issues in mixed order.  The following issues bought up in this thread have been externalized by Avital, and should no longer be replied to here:
    I believe it's still appropriate in this thread for replies like "Just converted our big project in one day, working great", "Feature foo is awesome, it let's us do X, Y and Z", and "Avi and David for president" :)

    If you have an issue that arises, before posting, search for keywords or just 'blaze' in meteor-talk.  Since Google Groups matches against the thread subject, it's another reason why seperating issues into seperate threads makes it more manageable and easier to find well named issues.

    Dirk Stevens

    unread,
    Mar 5, 2014, 6:01:58 AM3/5/14
    to meteo...@googlegroups.com, meteo...@googlegroups.com

    *** aaahh those warm and fuzzy feelings ***

    Thanks for the incredible work Avi, David and Chris - you guys rock!

    Gadi Cohen

    unread,
    Mar 9, 2014, 1:52:52 PM3/9/14
    to meteo...@googlegroups.com, meteo...@googlegroups.com
    While not directly related to Blaze, obviously many of us are using EventMinded's awesome iron-router.  I inadvertently gave some bad advice below, which would result on updated installs breaking from today.  Please note the following message from Chris Mather[1]:

    "Although I released blaze-layout to atmosphere, it's still being actively developed in combination with blaze-integration of iron-router. So until it's actually released, it's best to use the devel branch of blaze-layout, and the blaze-integration branch of iron-router. Of course, once we release the next version of iron-router you won't have to do any of this. You'll just add iron-router like you always have."

    So, instead of my original suggestion, set up blaze-layout in your smart.json as follows:

        "blaze-layout": {
        "branch": "devel"
        }

    I hope it's clear that running straight off of unreleased branches is considered "bleeding edge", intended for early adopters.  You should be prepared for things to break and for relevant changes and/or comments on the commit history of the relevant projects.  As noted by Chris, this will be the smooth experience we're used to after being officially released.

    Gadi

    [1] https://github.com/EventedMind/iron-router/commit/f8ffd44bceacc6a55f4ebcc218c072f5a18138b4#commitcomment-5612456

    On Friday, February 28, 2014 9:55:40 AM UTC+2, Gadi Cohen wrote:
    Yes, yes, yes!!!  Been waiting for another frozen release for a while :)  This is super exciting!  This release, alongside the improvements in 0.7.1, are massive indications of how Meteor has matured, and is both extremely comforting and exciting for startups who took the risk to get on the Meteor train early.  Looking very forward to 0.8... Meteor 1.0 is clearly on the visible horizon now!

    For those who missed Chris' email last night (or didn't read it in it's entirety), I'm summarizing what's involved for Iron-Router integration using meteorite:

    1. Upgrade Meteor as above:

        meteor update --release blaze-rc0

    2. Edit smart.json as follows (in the 'packages' section):

        "iron-router": {
          "branch": "blaze-integration"
        }

    3. Add Blaze-Layout to your project (more info about it on github):

        mrt add blaze-layout

    Disclaimer: I have no official involvement in Iron-Router / Blaze-Layout, but these steps worked for me and Chris will correct me if I've said anything wrong.  I'm sure many are as impatient as I have been to continue developing with this combo, and can confirm that the above steps work fine with several of my existing site with only very minor changes (API changes from template-engine-preview-10.1).  Check out the Blaze-Layout page for more info on how to exploit the new engine, but this is not required for a fast start.

    Note 2: The above packages all mention Meteor's shark branch, but since rc0 is based on that code, and is frozen, I think it's a safe bet.

    Gadi

    Avital Oliver

    unread,
    Mar 17, 2014, 7:01:19 PM3/17/14
    to meteo...@googlegroups.com, meteo...@googlegroups.com
    We've made a series of performance improvements on the shark branch. It is our understanding that now Blaze outperforms Spark in rendering initial data.

    Vincent Jaubert

    unread,
    Mar 19, 2014, 5:51:33 PM3/19/14
    to meteo...@googlegroups.com, meteo...@googlegroups.com
    Avital, is it already on shark ? 
    I have tested the app i have provided to you, it's still 1,5x slower on blaze than shark.
    Reply all
    Reply to author
    Forward
    0 new messages