These are chat archives for opal/opal

15th
Mar 2019
Jose Añasco
@merongivian
Mar 15 03:44
glad to hear that u guys are giving vue a shot!, so i was actually working on a wrapper the last weeks: https://github.com/merongivian/vue.rb, its basically a refactor of this: https://github.com/arika/opal-vue-trial, already mentioned by @aemadrid. Really interested in what @elia came up with though
Not really working as a gem though, need to work on that, but if someone wants to check the code or steal it and make a gem by my guest!
simple vue instances are working, but couldn't make components work 100%
i also implemented callbacks and watchers
Jose Añasco
@merongivian
Mar 15 03:50
Jamie Gaskins
@jgaskins
Mar 15 12:55
@merongivian Just saw this and it made me happy. :-D Are you using Bowser in your apps?
Mitch VanDuyn
@catmando
Mar 15 14:07
Not knowing anything about vue, what are the advantages over react?
Adrian Madrid
@aemadrid
Mar 15 14:55
@merongivian I’ll check it out
@merongivian set_caca really? you’re killing me… ;-)
Adrian Madrid
@aemadrid
Mar 15 15:00
@catmando can’t explain it well but for some reason it fits my brain better
it’s more like angular in that you use more the html/attributes to define your code
instead of having to define everything in your JSX/templacte code
so it is easier to get started quickly
in general, at least for me, it’s easier to reason/build things out
@merongivian looks great! simple and easy to reason about it
what are you missing?
Mitch VanDuyn
@catmando
Mar 15 15:09
@aemadrid that was my understanding as well, but once you build a ruby DSL then you are doing everything in ruby anyway, so it seems to matter less. That was where I got to with my brief look. But so many people like Vue, that it always makes me curious.
Adrian Madrid
@aemadrid
Mar 15 15:09
I guess I’ve tried React a few times and can’t never quite get to really enjoy/get it I guess
and my team has always gravitated to Vue too so that makes it easier to keep going there
Mitch VanDuyn
@catmando
Mar 15 15:11
yeah i can I understand that. The problem for me is the exact opposite. The instant I saw react, and how it works, I feel in love with it so its hard to see the otherside. I really have to do some playing with vue some day.
Forrest Chang
@fkchang
Mar 15 18:11
I actually don't like the angular like program w/html thing, but in a Ruby DSL I would dig it. Hyperstack's DSL is so much better and more powerfrul than JSX, IMO - it's a big part of hyperstack's value -- a more powerful single language for it all, React.js is still 2 languages, JS and JSX
@catmando the 5 min "why vue" video on https://vuejs.org/ is impressive on how "light" it seems to be -- assuming you're ok w/programming in HTML -- which as far as I'm concerned the Java guys proved with Ant that XML is a poor programming language decades ago
Mitch VanDuyn
@catmando
Mar 15 18:24
@fkchang I'll have a look at the video!
thanks
Adrian Madrid
@aemadrid
Mar 15 18:52
what I like about starting out with HTML is that you can take a whole HTML page and start growing it into a dynamic page
I guess is more of how visual you are: do oyu want to build out component by component or do you want to see it first and make it work bit by bit
eiko kokuma
@eiko_gitlab
Mar 15 19:28
^ this is the thing i like about vue. i can build a standard REST application, then drop vue in wherever it makes sense to have dynamic content. it supports the same javascript compiling that react uses, but it's off by default, which makes rapid prototyping feel more fluid to me
Mitch VanDuyn
@catmando
Mar 15 22:41
@eiko_gitlab kind of like hyper stack 😃
Mitch VanDuyn
@catmando
Mar 15 23:21
Here is a nice vue / react comparison
It practically begs a vue / react vs. hyperstack comparison
Adrian Madrid
@aemadrid
Mar 15 23:23
@catmando how did you come out after taking a look at Vue?
Mitch VanDuyn
@catmando
Mar 15 23:35
Very similar I think. The differences that I could see are pretty much syntactic. Under the hood it all works the same.
I noticed that Hyperstack seems to be wanting the solve the same problems. For example in both Vue and Hyperstack its much easier to manage state.
Adrian Madrid
@aemadrid
Mar 15 23:36
nice, thx
Mitch VanDuyn
@catmando
Mar 15 23:38
As you know I am a completely biased Hyperstack fanatic, so the following needs to be taken with a grain of salt...
Adrian Madrid
@aemadrid
Mar 15 23:39
I know … ;-)
Other than syntactic differences I still think the idea of starting with HTML and sprinking Vue is powerful
Mitch VanDuyn
@catmando
Mar 15 23:39
It seems that Vue results in people using React and tweaking some things to make it better. This blog would be an example of that perspective: https://blog.sourcerer.io/why-you-should-leave-react-for-vue-and-never-use-it-again-5e274bef27c2
So vue may be incrementally better than react.
Adrian Madrid
@aemadrid
Mar 15 23:40
for an old guy that got started with PHP a looong time ago it still fits me ;-)
I’ve also seen Vue react, no pun intended, to what React does
it wasn’t long after React came up with hooks that Vue’s creator showed a way to do the smae thing in Vue
(although I must say I don’t truly understand what/how those are/work)
Mitch VanDuyn
@catmando
Mar 15 23:41
Sure there is a symbiotic relationship there. And no doubt React will react to Vue
but the fundamental problem is that as a developer your brain has to constantly shift between three different syntaxes: JS, HTML, and some Templating system. If you are also involved in the server side of things you have juggle that too.
While its not impossible, it adds unnecessary complexity.
Opal saves the day by giving us a way to use Ruby everywhere, and Ruby is perfect because of its incredible meta programming features.
The result is you write in one language, without a lot of unneeded boiler plate.