Blaze 2.0 will be more like React, Vue or Blaze 1.0?

I’m about to begin a new project, and I still on the process of learning Meteor. I see that there is a debate around the front-end framework. And seems to me that if I learn Blaze I will get outdated with Blaze 2.0, what should I do? Learn React, Vue, or just learn Blaze and expect that it doesn’t change much in further versions?

Thank you.

1 Like

I wonder how long this will be happenning. :slight_smile:

Dead new Meteor developer, Blaze 2 was a short lived project that is not worked on. Blaze is now a separate, community-maintained project. In the community there are plans to make Blaze 2 based on Vue and some proofs of concept for that, but for now they’re just experiments.

Read more about it here, in official announcement from January 2016.

Personally, I’m very happy with Vue.

Alright, I understand now. Thank you for the clarification! :slight_smile:

I am happy with Blaze.

I am also happy with React.

Blaze and React play really nice together. You can use Blaze in React and vice versa.

I am not sure that is so easy with any other view frameworks but maybe someone else can chime in with more accurate info in this department.

The “what should I use for my view layer” debate teeters dangerously on falling into a religious war depending on who you talk to on here.

Bottom line IMO: you got a lot of great options.

1 Like

I’ll just state that it’s not as easy to combine Vue components with Blaze templates as it is between React and Blaze. There are solutions but they still require hacky workarounds to provide stuff like passing props between the components and templates.

I’ll second this. I had no real issues with just Vue + Meteor, but mixing Blaze and Vue has not been fun (and there’s almost no resources/help on the topic). And since the point was to migrate a large application slowly from Blaze to Vue, there’s no getting around mixing the two for me.

Found any tutorial or help on how to migrate a large project from Blaze to purely Vue? Im about to start but not sure how yet. Thanks

Maybe this helps: discovermeteor: Blaze to React.
I know you are asking for Blaze to Vue, but some patterns apply as well. The rest is just rewriting your components! :wink:
Its not that hard. First do your router stuff, move your subscriptions to the appropriate place for Vue and move on from there!

Use whatever you want, man. If you’re comfortable with Blaze, use Blaze.

I would personally recommend React and I was in the same situation as you. I decided to take on React because it was different and made me feel like I was actually writing “real” javascript (really, it was). I felt like the “real” code with Blaze was abstracted away too much for my liking.

In case of problems, ask here on the forum or catch me on Vue’s gitter room where I’m hanging out, or Meteor’s discord where we have a small Vue room too. I’m not sure what exact issues do you find.

Do you keep your subscriptions in the router (like Iron Router does) or in the templates (like Flow Router does)? Do you use a package like manuel:viewmodel or blaze:components? All of this affects the rewrite.

Also, do you write actions in some higher level component for elements with classes defined in some children components? While the pattern itself is not a bad one, there is no track of it in the children components (like there is in React or Vue), so this is especially a pain when you’re trying to rewrite an old or even worse, 3rd party application, where you have no idea how the code actually works - which classes are there just for styling and which ones are responsible for some user interaction. Lastly - what kind of interaction is that.

Thanks to that last thing it was an awful experience when I tried to rewrite Accounts-ui.

Im keeping my subscriptions in the templates since I use Flow Router. I will share the list of packages I currently have installed.

jquery@1.11.10
flemay:less-autoprefixer
reactive-var@1.0.11
raix:handlebar-helpers
audit-argument-checks@1.0.7
browser-policy@1.0.9
natestrauser:animate-css
dburles:collection-helpers
meteor-base@1.0.4
mobile-experience@1.0.4
session@1.1.7
tracker@1.1.1
logging@1.1.16
reload@1.1.11
random@1.0.10
ejson@1.0.13
spacebars@1.0.12
check@1.2.4
service-configuration@1.0.11
accounts-facebook@1.0.11
accounts-twitter@1.1.12
okgrow:router-autoscroll
percolate:paginated-subscription
standard-minifier-css@1.3.2
standard-minifier-js@1.2.1

osv:mongo-counter
aldeed:collection2
lepozepo:s3
mongo@1.1.14

semantic:ui
juliancwirko:s-alert

meteorhacks:search-source
http@1.2.10

kadira:flow-router
kadira:blaze-layout
blaze-html-templates@1.0.4
tomwasd:flow-router-seo

zimme:active-route
velocityjs:velocityjs
czbaker:apac
meteorhacks:kadira
wizonesolutions:canonical
meteorhacks:ssr
erasaur:meteor-lodash
percolate:synced-cron
astrocoders:one-signal
juliancwirko:s-alert-stackslide
shell-server@0.2.1
meteortoys:allthings
ecmascript
raix:rssfeed

So I think from this I will need to install:

akryum:vue-component
akryum:vue-router2
akryum:vue-less 
vue-meteor-tracker

I know the basics on how Vue components works but Im still not sure where I can put meteor code. I need to add the meteor object to my Vue components and hook up all the Mongo finds and subscription there to my data? In the meteor object I seen in some example a data part as well. Whats the purpose of this since the vue object itself also has a data part. Is it for meteor specific stuff that does not work for the vue data part? Example here

I don’t have any actions in higher level components written for child classes I think. I have some global helpers I use across the applications.

For routing I use the following pattern, pretty standard:

<template name="applicationLayout">
    <div class="site">
        <header class="cd-morph-dropdown">
            {{> header}}
        </header>
        <div class="site-content">
            {{> Template.dynamic template=main}}
        </div>
            {{> footer_button}}
        <footer class="dynamic-footer">
            {{> footer}}
        </footer>
    </div>
    {{> search_overlay}}
    {{> login_overlay}}
    {{> product_popup}}
    {{> sAlert template='custom_salert'}}
</template>

I then use this in my routes.js file like:

FlowRouter.route('/', {
    name: "home",
    action: function(params, queryParams) {
        BlazeLayout.render('applicationLayout', {main: 'home'} );
    },
});

As of my understanding it would not be to hard to change this into whats described [here] (https://github.com/Akryum/vue-meteor/tree/master/packages/vue-router2#app-layout) right?

I will let you know as I am running into problems and please let me know if you think there will be any issues migrating this. Thanks a lot!

This is not the best topic for that. I answer here: Basics: Setting up a Meteor + VueJS project

Akryum provides packages for using vue in blaze and other way around. Although I find that using jquery or ui frameworks is difficult in vue.js, and react is just ironclad bug proofing rather than hacking.

I would like to try Vue, but have problem with Form Package.
Blaze has AutoForm
React has Uniforms
Vue has ???
Please help me…