meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

Any interest in a Vue port? #243

Closed eagerestwolf closed 6 years ago

eagerestwolf commented 6 years ago

Since this is the quintessential app to show what Meteor is capable of, is there any interest in the Meteor community or development group to see a Vue port of this? I would be willing to take on the task if needed.

hwillson commented 6 years ago

I think a Vue port would be great @sethmurphy18! If you're interested in working on one, that would be awesome!

eagerestwolf commented 6 years ago

On it then

eagerestwolf commented 6 years ago

Ok, I am having some issues, so I am going to open an RFC from the Meteor team. Vue and Meteor do get along, barely, except in one regard: reactivity. Tracker and Vue simply do not work together. I have found a package that allows me to use subscriptions: vue-meteor-tracker, however it has 1 huge issue, I can only use 1 subscription per component. That's it. I can use more, but that would require using a modified version of vue and a modified version of tracker. While I could very easily do this, I think it kind of defeats the purpose of the todos app, which is to highlight how easy and flexible Meteor is. Also, it would appear @mitar has been working on a port of the todos app already. That said, I have 3 options for this app:

  1. I can try to rewrite the plugin I am using to see if I can make it work
  2. I can use vuex and track everything using states and create a literal single page app (single route too)
  3. I can use apollo, and go the graphql route, since apollo and vue are fine together...I think.

In terms of difficulty, I would say these are all fairly close. Apollo is only difficult because of having to redo the entire API part of the app.

mitar commented 6 years ago

Why not use fork of vue and modified version of tracker? They are drop-in replacements and then you can just use multiple subscriptions per component and full reactivity and everything you are used to. Just try out vue todo app. Works like a charm. :-)

eagerestwolf commented 6 years ago

I am getting about to that point. This is very annoying. I am not knocking the vue-meteor-tracker package, but it's limitations are kinda infuriating.

eagerestwolf commented 6 years ago

I'll let you look over what I have @mitar and see what you think. I hate showing my code in progress, since it is definitely not my best, but maybe you can see something I am missing.

https://github.com/eagerestwolf/todos-vue-meteor

eagerestwolf commented 6 years ago

Oh btw, ignore all the test data. I literally ripped those straight from the react branch so I would remember to make Vue versions later.

eagerestwolf commented 6 years ago

Ok @mitar I hate to bother you...again...but I have hit a stumbling block. I cannot get the subs to run at all now, and I am not sure what I am doing wrong. I switched to your version of Vue and your version of Tracker, but they just won't run. Any suggestions? I updated the code in the repo.

mwarren2 commented 6 years ago

@sethmurphy18 Glad to see that you are on to this. You seem to have set something rolling, and noone need doubt your competence to deal with this.

But - correct me if I'm wrong - this isn't just about the todos-app, it's about Meteor/Vuejs as a whole.

So I just wanted to register a plea to MDG to put a bit of weight behind Meteor/Vuejs - even if it's just opening a few doors, talking about it, organizing stuff, and generally helping you with this. We've had people giving up a load of spare time and everlasting thanks to them, however Meteor/Vuejs is still in beta after a couple of years (I think), so I'm trying to be realistic.

And I'm certainly not complaining. I'm grateful for the work that has been done (Akryum), which has enabled me to get quasar-framework working with Meteor, which is what I personally am interested in.

@mitar has done some great work with Vuejs, but it looks like it has to stay as a fork, for the moment.

@hwillson Any possibility of MDG getting involved? I can't see how this is going to be solved without MDG giving some input, and encouraging an official line: correct me if there already is one !

I've been messing with Vuejs for over a year now, and I wish I could use it in anger. Noone has the slightest doubt that Vuejs is good for Meteor. But obviously it's difficult to feel confident putting it into a Meteor project while things are in a bit of a state of flux and projects are in beta.

eagerestwolf commented 6 years ago

@mwarren2 I kinda disagree. Meteor/VueJS is far from even Beta. We still are at the point that using Vue with Meteor requires not only a patched version of a Meteor core package, tracker, but also a patched version of Vue itself.

That said, I believe the Blaze team, of which I believe @mitar is a part of, has stated that they want to use Vue as Blaze 2.0. I have looked into writing a plugin to bridge the gaps between Meteor and Vue, but sadly I do not have enough knowledge about the inner workings of the Meteor Reactivity System to make it work correctly.

And, yes, you are correct, part of my intention with this was to demonstrate to MDG that Vue and Meteor would be an excellent pairing, however, it is not a very good pairing at this time due to the amount of problems I have encountered. I simply cannot get Meteor's Reactivity System to work with Vue's Reactivity System, even using a pactched tracker and vue, so I have put this project on the back burner for the time being. As it simply will not subscribe to anything on the Meteor side of things. I am still working on trying to make the 2 work, just working from a different approach like we had to do in the early days of React.

mitar commented 6 years ago

Meteor/VueJS is far from even Beta.

I mean, it is stable. And working. And feature complete.

We still are at the point that using Vue with Meteor requires not only a patched version of a Meteor core package, tracker, but also a patched version of Vue itself.

So? This is just a way to distribute a code. Once you do that, it works like you expect.

mitar commented 6 years ago

simply cannot get Meteor's Reactivity System to work with Vue's Reactivity System, even using a pactched tracker and vue, so I have put this project on the back burner for the time being. As it simply will not subscribe to anything on the Meteor side of things. I am still working on trying to make the 2 work, just working from a different approach like we had to do in the early days of React.

You would have to create a smaller reproduction for me to be able to help you here. A ported TODO app here works great with Vue and Meteor:

https://github.com/meteor-vue/todomvc

See example component here: it is a great mix of Blaze and Blaze Components. Everything you expected, just that naming is slightly different. And of course, Vue template itself. (For the latter, Vue supports preprocessors so we could probably create blaze template -> vue template preprocessor.)

pentatronix commented 6 years ago

What is the state of this?

mitar commented 6 years ago

It is implemented, see the link: https://github.com/meteor-vue/todomvc

hwillson commented 6 years ago

Hi all - there hasn't been any activity here in a bit, so I'm going to close this off for now. If anyone is interested in working on a Vue port, definitely let us know. Thanks!

mitar commented 6 years ago

I mean, Vue port already exists. So I am not sure what would have to be done more?

hwillson commented 6 years ago

Great - I think the OP was referring to a Vue port of this todos app, but either way https://github.com/meteor-vue/todomvc is awesome. Thanks!