by mieseratte · 8y ago · 0 comments
To me, it looks like Backbone, AngularJS, and React had an orgy and out came Vue. The "opinionated" claim strikes me as marketing BS, templating vs. JSX, attributes vs. components (assuming you're using their templating language), etc. There really isn't a performance benefit over React. You're wading into a new ecosystem without all the build-up React benefits from. The templating language itself is yet another thing to learn, and frankly I just don't think embedding control flow into the templates themselves is a sane approach.
The documentation folks love to talk about is alright, I've definitely seen worse, but it is too much "Go do X" and not a lot of "Why we do X." The latter is a particular strength of React, in my opinion, as they describe very well the underlying logic behind why something is the way it is.
About the best argument for it is the batteries-included nature of the projects, but even then I've not truly had that much trouble upgrading something like React Router such that it would make me question using it in the future.
And I think it's also important to note that most of the things you point out are matters of preference. I've seen Vue fans and React fans argue about these things until they're blue in the face, when all it really boils down to is that some people like the way Vue does things, and some people like the way React does things.
Healthy debate is good. But the downside is that I've noticed these debates devolving into what I call identity politics for programmers - instead of seeing the other group as front-end developers who just like doing things differently, I see people breaking the world down into two groups: people who agree with them, and idiots. And I don't think this approach is very good for us as a community.
So I don't mean to single you out here, but the author didn't really criticize React in any way, so I don't think coming to the defense of React vs Vue here really added to the conversation.
Why not just say, "hey, I prefer React, but it's good Vue exists for folks who prefer a different approach.". Vue's existence isn't a threat to React. It's okay to have multiple approaches to the same problem.
I prefer React too, but I don't think a front end framework monoculture is a good thing so I hope that Vue, React, Aurelia, Ember, and others continue to grow.
Vue's component separation of HTML/JavaScript/CSS just clicks better for me.
Would you object to things like unobtrusive javascript?
Things like unobtrusive javascript came to be because people recognized early on that HTML was not enoug for writing applications -- that you needed something more. Since basically the entire world has come to embrace unobtrusive javascript, it isn't a logical leap to embrace JSX.
https://medium.freecodecamp.org/react-s-jsx-the-other-side-o...
Yeah, as a C++ dev, I skip all of the front-end, back-end and "full-stack" jobs... :(
> PHP + jQuery applications.
As much as people like to detract, Wordpress and friends power a significant portion of the web. The PHP market is pretty big.
Oh well. I'm glad it's providing value to people. I might just never understand.
Because I keep seeing folks extolling the virtues of Vue, but when I went and used it I simply found little to nothing of merit compared to existing solutions.
I'm not running around telling folks what to use here, but rather stating my experiences. Perhaps someone might come along and provide a reasonable explanation of how I misunderstood something or a problem it solves better than existing frameworks but all I get is "I look it and you don't so meh."
In short, I'm trying to spur a technical discussion here but all I get in return is fanboyism and folks trying to shut down the conversation.
> but the author didn't really criticize React in any way
Actually, the author criticized React both in direct and indirect ways. He also made incorrect and or misleading claims. Of course the author also goes on the mention that he or she is inexperienced with React but somehow still feels qualified to make those claims.
Sorry for trying to add to the discussion and not just posting "Oh gee, I sure do love Vue too!"
> but I don't think a front end framework monoculture is a good thing
Neither do I.
But with the KISS approach Vue takes, I've only very rarely cared about the ecosystem at all. I think that the weakness you are seeing here is a straw man from the nature of React's over-architected approach, which Vue does not significantly suffer from (sort of, we don't need a bunch of apps, just a good phone).
Is there a particular situation you are thinking of when you say we are in need of said ecosystem?
I think quite similarly. I've only paid attention to third-party components maybe once or twice.
That said, ecosystem size, health and critical mass do factor into project longevity, as well as perceived adoptability, all of which feed back into each other.
However, in the context of React, the discussion about ecosystem elides the high necessity of using it, since core React stands a virtually zero chance of being sufficient.
I think an SPA version of a CRUD app wouldn't need anything past core React. Most people don't talk about things that unamibitous, though.
> Is there a particular situation you are thinking of when you say we are in need of said ecosystem?
Here's a concrete, real-world example. I spent several months researching Vue and React for a large SPA migration from AngularJS at work.
In order to migrate a single page, I had to write three compatibility libraries that already existed for React. This was for a simple page that pulled in data via an API and displayed it in a handful of tables.
Another engineer did an audit of our third-party library use and needs, e.g. complicated "excel" like spreadsheet tables, and we simply couldn't find an existing Vue solution. That meant I would need to write my own compatibility libraries for at least another half-dozen complex libraries. There was an argument in favor of using Vue because we could get a lot of open-source exposure so I'll give it that. Plenty of low-hanging fruit for the open-source Vue developer.
Perhaps Vue folks are only working on extremely small, basic, CRUD applications. The software I work on is not.
> I think that the weakness you are seeing here is a straw man from the nature of React's over-architected approach
React simply provides you components with a lifecycle. You are free to architect and compose those primitives however you see fit.
Contrast with Vue, can you please reasonably explain the difference between a custom attribute vs. a component and when it would be appropriate to use one over the other? How is this simpler? How is this "keeping it simple?" This is only a single deviation between the two.
Vue tells me it is "opinionated" but when I have to research, compare, and contrast it's own core features I have to ask how is this "opinionated." If I have to do all of this legwork how is it "Keeping it Simple, Stupid?"
To Excel, I wonder how much reimplementing was needed again, did you need computations in-cells like Excel has? It seems like if you are going that deep you will need to implement much of the logic on your own. I guess if you are truly just reimplementing Excel in a web interface, then your point has merit, but it seems like for something that specific, the preboxed solution would more get in the way?
To directives versus components, certain behaviors make more sense to me as an HTML element (an infinite scroller, for example) than as a "controller-level" component. Additionally I've found a great transparency of debugging by starting with the HTML and looking at what functions are being invoked when, than by hoping I know where the "controller" is binding into the HTML, and perhaps never finding all of it.
And fair - I still don't know what "opinionated" means... lol
Disclaimer: I don't use React or Vue. I have no idea how their mobile versions compare. I get my virtual DOM kicks from Ractive, developed by The Guardian newspaper. I'm told it's like Vue. I really like it. I'll probably move to Svelte for my next major project.
While NS is fairly mature at this point, the vue bindings only reached a 1.0 release this year. There's been a lot of development done on it recently, though. I am unsure if anyone major company has shipped using NS-Vue.
The other thing that React does is encourages top-down propagation of immutable data, which nicely fits ClojureScript and other FP languages. Is this approach equally efficient in Vue?
Lastly, when I looked at view, it had a lot of sort of OO stuff happening in the docs, which doesn't map very nicely to ClojureScript and friends.
Do you have any docs / blog posts on programming in Vue with pure JS (no templates or magic) and in a functional way? If so, I'd love to read them. I may spend a weekend trying to put a ClojureScript layer on top of Vue.