Open arggh opened 7 years ago
We can offer a small bounty of say $200 for this for anyone who wants to tackle this and performance improvements. Goal would be to have a drop-in replacement that performs better than the current version, but priority is in performance improvements first. We have a complex app that is mostly on Blaze VM that can be used as a test bed.
@ManuelDeLeon We're also fine tossing some cash your way if you want to take a weekend to look at any performance improvements you can think of for the current version. I know Blaze VM isn't your priority right now, but it would be really helpful for us in the coming months - we might transition over to React as well next year but getting stuff to perform better for now is also a nice thing. :)
I'll create a new GitHub repo for ViewModel projects and put in the effort of making it easier for people to contribute. That means converting VM-Blaze to JS and make tests for VM-React accessible to anyone. Part of the work would involve creating detailed instructions on how to download, modify, and test the project, submit a PR, etc. I don't use VM-Blaze anymore so I don't have the motivation to work on it (sorry, it's sad but true) but I can definitely help and guide anyone who wants to contribute to it.
Right now I'm in the process of rewriting VM-React with performance in mind. See this thread for more info.
As for money, Once I get the ball rolling with the contributor friendly setup, I'll probably use CodeSponsor or maybe even Patreon.
Hey @ManuelDeLeon, any updates on getting the ball rolling with this one? Is there something you could use help with?
I'm soon trying to find the time to study the codebase, convert ViewModel from CoffeeScript to JavaScript and get started with fixing the bugs. @ManuelDeLeon , if you had any work done on this conversion, please do share as it would make life a lot easier :)
Check out the react version for inspiration since it's done in JS and many cases you'll be able to find the methods or functionality of one in the other.
I noticed ReactiveArray recently lost some weight in the form of coffeescript
dependency, are you by any chance planning on still giving ViewModel the same treatment?
Not really. With the Coffeescript changes I don't even know how to run the tests anymore (I used mocha).
On Mon, Jun 4, 2018, 12:10 AM arggh notifications@github.com wrote:
I noticed ReactiveArray recently lost some weight in the form of coffeescript dependency, are you by any chance planning on still giving ViewModel the same treatment?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ManuelDeLeon/viewmodel/issues/297#issuecomment-394244391, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31kpYqt9P40ZJwZaQbJ0pNKqzLNuSks5t5M9DgaJpZM4PzbaG .
I believe diaconutheodor
, whom was just speaking at Meteor night, has published a compatible version at https://github.com/cult-of-coders/meteor-mocha. At least I got ViewModel tests running with that.
I'll give it another try then.
On Mon, Jun 4, 2018, 1:48 AM arggh notifications@github.com wrote:
I believe diaconutheodor, whom was just speaking at Meteor night, has published a compatible version at https://github.com/cult-of-coders/meteor-mocha. At least I got ViewModel tests running with that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ManuelDeLeon/viewmodel/issues/297#issuecomment-394264599, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31oK3mciwcavwPg7uVTe-AvIJxnoPks5t5OZpgaJpZM4PzbaG .
I was trying to convert ViewModel to JS myself, but it turned out to be a bit more difficult than I expected, since I don't really know Coffeescript and I certainly don't know ViewModel and Blaze.
So I've been (not so) secretly wishing that you would find it worthy of your time to finish the goal stated earlier in this issue, and my hope for that to happen got some spark when I noticed ReactiveArray was now JS :)
Can you make a repo that's able to run the viewmodel tests? I keep getting coffeescript errors even with cult-of-coders' mocha =(
I just checked out a fresh copy of ViewModel, changed package.js
to switch the mocha-library like so:
Package.onTest(function(api) {
api.use(
[
"coffeescript",
"ecmascript",
"blaze",
"templating",
"jquery",
"underscore",
"tracker",
"reload",
"sha",
"reactive-dict",
"manuel:reactivearray",
"cultofcoders:mocha",
"practicalmeteor:sinon",
"practicalmeteor:chai",
"manuel:isdev"
],
CLIENT
);
and...
$ ~/Development/viewmodel$ meteor test-packages ./ --driver-package cultofcoders:mocha --port 4000
[[[[[ Tests ]]]]]
=> Started proxy.
=> Started your app.
=> App running at: http://localhost:4000/
I20180606-20:13:31.747(3)? MochaRunner.runServerTests: Starting server side tests with run id knRYRTjMh9ygKMo5v
W20180606-20:13:31.845(3)? (STDERR) MochaRunner.runServerTests: failures: 0
I didn't remember I had switched to a commit somewhere around 6.3.3
, but it also seems to work with 6.3.7
.
Cool. It works for me now =)
I'll give it another try then.
I haven't given up on you!
Would be awesome, if ViewModel was just JavaScript instead of CoffeeScript.
Depending on the targeted browsers, this might even have nice performance benefits in both execution and weight.
The most important benefit would be more contributors and increased confidence on using the library (it's just JavaScript vs. I need to learn CoffeeScript to fix this simple bug).
I already tried to achieve this using Decaffeinate and Prettier, but gave up for now.