Meteor Needs the Second Coming of Blaze

In the past year or so, React has been very strong in the JavaScript world, and we all lost our cool as it rose and Blaze stood still. We went from “this is over” to “this will get better” to, “everyone use React,” down to “let’s fork Meteor.”

With more turning to the Meteor/React integration, we are seeing new problems, and given the state of limbo, I’m going to make a case here for why Meteor needs Blaze, and why Blaze only needs a bit of love to become a lot better.

First, every web framework has a view layer. Rails, Django, Laravel, even Sails, all have their own web layer. They are by no means the best in class, but they are present, they are used, and they are useful, in their own way. At minimum, they provide a good starting point and an easy learning experience.

Second, integrations are complicated. Each front-end stack has its own tooling and eco-system. This makes it really hard to “fit” them into Meteor. You will also always be behind, and updating for each release costs time and money. I think a better solution is to provide adapters for other front-ends like Firebase has been doing.

Third, sure, Blaze has bugs. So does Angular 1, so does everything, but that hasn’t stopped people from using it. Most of the bugs seems to come from people doing crazy things in Tracker, so…..

Let’s hide Tracker! Tracker is causing most of the problems because people are using it without thinking about how it works. It’s simple to use and easy to get carried away. That magic is dangerous!

I generally avoid using Tracker, aside from using it via the features it powers like minimongo, reactive-dict, Session, etc. But that doesn’t mean I don’t also like to live dangerously.

Fourth, we can drop in React where needed. If you have something really crazy going on, you can create a React container to manage it. Currently, this is not desirable because we don’t want to load Blaze, React and all the other stuff on the first page load. But, there is a solution…

On a side note, I think React is overkill for the stuff we all build. You have to keep in mind when you’re dealing with “Facebook scale”, they literally have code bases that are multiple terabytes! Of course they need these kinds of solutions, but I think I can speak on behalf of everyone here by saying we’re not there yet.

What if we could lazy load? If Blaze were able to load templates and code on demand, many of its problems would be solved. We can stop pushing giant apps on the first load, and then we can lazy load the big templates, React, Angular, and all of our hopes and dreams.

In conclusion, I think if Blaze supported incremental loading, and if we tuck away Tracker to keep people from “hurting themselves,” then Meteor would have a reasonable front-end solution with a lot less problems. It would at minimum be a good way to end the saga.

It won’t be as robust as other front-ends, but it will have a unique position as a fast and powerful solution. It would just be a matter of knowing when and how to use it. What do you think of this approach? Let’s talk about it on Crater.