Why I believe in Blaze

Blaze is simple and more intuitive than React but why Blaze not React or vue for start up prototyping?
React come with tons of ready to use components and UI components.
React is JavaScript thus the “tideness” of the code depend on the developer skill. React component can have all the styles embedded in it which ease work speration as one jsx file which include js, html, and CSS. Developers who spend more time writing pure JavaScript (React need more JavaScript skills)may result in stronger backend and frontend developers. And since startups have limited budget, it may save time and money to have some components ready as prototypes for further development later instead of rewriting the code again with React/Angular/Vue . Plus tutorials on how to use React and the documentation of React is more than Blaze. So should startup choose Blaze mainly because it is more intuitive?

For me your arguments don’t hold true. You don’t become a better backend developer because you used React on the frontend. You need javascript just as much when using Blaze.

Many things are good with Blaze, but it has lost a lot of momentum past 2 years because:

  • Performance is less then React (when it comes to Mobile, things like that are important)
  • No support for SSR (which is something a lot of people want)
  • Hard to find new packages or updated ones (mainly because it lost momentum)

Appart from that it is still the only templating that integrates so well with Meteor (think ui-account package…) and this is a really great approach for non-dev people to be able to look and change things.

I really like Blaze, it’s just so sad nobody tried to rewrite the core of it to make it more performant and include the latest features other framework have right now.

Some packages added componentization for Blaze (ViewModel, which I find amazing to write, and Blaze component )

I strongly believe this should be in core as well as a router, and animation support linked to the routes / the show/hide of section (like Vue made it so simple)

Anyway without this additional work, I don’t see Blaze coming to the surface any time soon

1 Like

thanks man thats cool

I dropped React in favor of Blaze. With Blaze I am still faster in creating components. Can’t see the benefit of React, besides “everybody does it”.

12 Likes

I also do my projects with blaze, It’s an cool template engine and a good fit to meteor.

3 Likes

I’ve also tried to stick to Blaze until I needed something more powerful, but limitations like Blaze wiping out iframe contents when moving DOM elements around, made me want to switch away from it.

2 Likes

It’s do not think it’s one versus the other in React/Blaze. I can absolutely see the need for React style codebase. My personal opinion is that one codefile for both view and component logic is anti-pattern, but one can use view template extensions for React if that is the desired pattern. You can literally write code with the identical patterns in both, and all of the core javascript logic in your component methods would work in both Blaze and React (this is what we spend most of our time writing). And you can write equally bad code for both.

I agree! Blaze is amazing with Meteor. So much less to worry about because of how well they are coupled and built for reactivity. I am glad you posted this! I am not the only ones who can see the brilliance in blaze/meteor

5 Likes

I absolutely love Blaze. I absolutely love React.

I use the both together. I think they compliment one another very nicely.

I typically start the build out of my app in Blaze. Most view and list screens, menus, etc are ridiculously easy to slap together in Blaze. With Mocha, chai, sinon etc I can get decent test coverage too.

But then I might hit a complicated UX that requires more fine grained control and testability. So I jump to React and Enzyme to build out these parts embedded in a Blaze parent template.

I use the best tool for the job. Blaze and React work together beautifully. Depending on the project Blaze may be all I need. But React’s got my back when things get gnarly and I need a more powerful toolset.

4 Likes

This sounds like a great approach. I hand’t thought much of using the two together. Also to be honest I prefer to NOT use a VDOM. I have seen instances where the abstraction away from actual ViewModel causes dependency on it. In other words, the Browser only ever sees the DOM, so I prefer to work with something that is a close to that as possible, rather than the extended abstraction. It forces discipline I feel, and makes for a lighter DOM in the end.

For anyone here, I’m hoping to get feedback on my package I just published for Blaze. It is quite handy and powerful for maximum flexbility in defining Modal views for Bootstrap in Meteor/Blaze. I would like to put the finishing touches on it, and it would be great to get input from other devs. [ANN]: MasterModal - Giving back, fully featured bootstrap modal package

I too believe in Blaze and like it much.

But the question is fundamentally as I have understood it for myself not about what you like but what you build with it.

React was not that revolutionary but everyone’s got hooked by the grand Facebook behind it. And it became self-fulfilling prophecy because when many people believe in something it gets components/code/support/etc.

So, even if we consider Blaze as wood and React as bricks (though I do not think it is that big difference), both have their pluses and minuses.

But what you have built with them matters more.

3 Likes

Almost three years ago we made it easy - meteor template helpers.

4 Likes

I combine jade and blaze for my app. My codes become much more beautiful than ever

2 Likes

There’s nothing wrong with Blaze… or really anything. The only “problem” is if you can’t live with ignoring the “must use XYZ framework or die trying” crowd. If you can’t bring yourself to ignore that stuff, then yeah blaze has problems.

1 Like

And over 6 years ago this was done in handlebars. So yeah this is nothing new. It was what I first looked at about 3 years ago too.

I wanted to do a different style. Something a little more elegant than putting operators in quotes, and it has a nice ternary feel to it. I realize I should have made that more obvious.

[edit]
I’ll add that to the docs.

1 Like

I disagree with that it wasn’t revolutionary. As far as I remember one of the first talks where React was introduced to the public was entitled “Rethinking best practices”. The biggest difference between React vs other frontend frameworks at that time was that React favours immutability. Instead of mutating the DOM manually you basically re-render entire application with new data. React also popularised virtual DOM.

2 Likes

Actually I think the revolutionary part of react was it showed an implementation of web components without the need change browsers, specs etc.

Web component has been pursued for long time without any success until react, the immutability and virtual DOM are implementation details.

What real benefits it has brought on some of your real project vs Blaze? And at what price?

Concrete buildings bring speed of construction but they also damn cold compared to brick buildings.

I’ve used Blaze a lot with bootstrap, and yes react is slower to start with when compared to blaze and for smaller project it adds little value. But as soon as you want to reuse and abstract then react offers an API to build those components.

Furthermore because it standardized the way components are built, NPM got flooded with all kind of react components.