7 ms·
It says they tried not to be biased, but it doesn't look like they tried at all. Apparently every design decision made in Vue is superior. This isn't a fair com
by mythz 10y ago
It says they tried not to be biased, but it doesn't look like they tried at all. Apparently every design decision made in Vue is superior. This isn't a fair comparison and shouldn't try to masquerade as such, it would be fine if it was positioned as an opinion piece on why we think Vue's approach is better instead of a "perfect framework" ad it is.
But after using JSX I'm never going back to a templating system. JSX has an intuitive direct mapping to JS that lets you use the full power of a programming language without needing to learn another crippled DSL syntax.
If you've never used React before after reading this you could be forgiven for thinking it's a complex monstrosity needing a week of prep to build a HelloWorld app which is a biased gross over exaggeration. React has one core concept, Components, which is easier to create, encapsulate and reuse better than anything else I've seen. I also believe in React's being able to use JS for Views, Style and Behavior making it easier to encapsulate cohesive Components.
I consider Ecosystem, community, dev resources / backing, encapsulation and reuse integral for adopting a framework which React wins easily on but is quickly disregarded here.
Whislt this is a biased guide Vue has convinced me enough to evaluate it, I'm especially interested in its performance and being able to reference it like a jQuery script tag which I believe is the biggest shortcoming of modern JS fxs which has succumbed to npm micro module madness inflicting complexity and friction on all developers which is IMO the major source of complexity when adopting a modern fx.
- progx 10y agoI didn't use vue, but https://vuejs.org/guide/syntax.html https://vuejs.org/guide/syntax.html did not look so complicated. But you are right, i am not sure to use a template system again. But the advantage is cleaner code, many people change quickly to spaghetti code in jsx (mix all together, ifs, loops, ...).
- mythz 10y agoSpaghetti code refers to poor coupling not cohesive encapsulation or being able to build complex smart views which can easily be refactored using native programming language constructs. I'd much prefer having a single powerful language for everything instead of forced artificial friction on having to spread your component over multiple DSLs.
- vladimir-y 10y ago> being able to build complex smart views which can easily be refactored using native programming language constructs For the record, JavaScript can not be easily refactored, since it's a scripting language with no strong types and no compilation phase, so to conduct a complex refactoring you will have to load all code base in you head and that's far from being easily. TypeScript for example is another matter.
- im_down_w_otp 10y agoThat's what regression tests are for. Also, no amount of compiling or strong typing is a sufficient alternative to regression testing when it comes to refactoring.
- vladimir-y 10y ago> That's what regression tests are for. Don't loose the point, I was written about another thing, not about tests. Every time when fanboys of functional programming (and scripting) are trying to argue that functional programming is a silver bullet they do write about tests, it's not an argument, tests are exists for any kind code no matter the code nature. Tests won't help you a lot with code analyzing, automatic refactoring and tracking down from where things came (coupling). In case of scripting (and functional programming) you will have to load all the code base in you head and only then you will be able to make some architectural decisions or perform a complex refactoring. Tests just help you to not break the system logic doing refactoring, that's it. > Also, no amount of compiling or strong typing is a sufficient alternative to regression testing when it comes to refactoring. No one was saying that compiling or strong typing is alternative to regression testing, don't know where you have got that idea.
- paulddraper 10y agoRegression tests can automate refactoring steps???
- pluma 10y agoI like that Vue seems to be carrying Angular1's torch of "make it easy for non-programmers to write templates" but I feel like that has been an illusory strawman from the start. Not only does it mask the fact that the supposed non-programmer template designer would still have to understand HTML and CSS yet somehow not have even the most basic knowledge of JS, but they would still have to be able to use whatever build tools are necessary to actually render those templates, including version control and node.js (which is the de facto platform for client-side build tools these days). The target audience seem to be old-school "webmasters" who FTP their PHP templates to the live server yet we're talking about technologies requiring a workflow that already precludes them. So we're talking about a scenario that only benefits people who already tick all the boxes for "front-end developer" except they apparently suffer from a nervous breakdown if they have to look at an if-block or understand a for-loop yet they'll be fine learning another template language that is typically based on JS expressions anyway (though Angular was guiltier of this than Vue). Maybe these people exist. Maybe there are teams where optimizing technical decisions for these people results in a net benefit. But I strongly doubt that this scenario is so widely applicable that this design decision makes a framework inherently superior when the cost of JSX to a team of JS devs is practically nil.
- wojcech 10y agoI am that person. Coming from an electrical engineering/Low Level programming background HTML is a Markup language. I get those. CSS is stylesheets and in my opinion very straightforward. The hard part is making designs that are functional and beautiful and making it cross browser compatible, but CSS has very few warts if the "wtf" variety JavaScript and it's ecosystem is disgusting for me. It's not hard, I can write stuff in it, it's ugly. I just don't want to touch it if I can avoid it. Pure personal preference. Typescript and elm help me to minimise the work I have to do in that mindspace. Maybe vue aims at similar clientele with less taste for statically typed/functional programming
- pluma 10y agoYou admit you understand it and it's just a personal preference. Therefore you're not that person. The stated goal of making templating accessible to programmers isn't to shield people who don't like JS, it's to shield non-programmers who don't understand programming languages. This is the absurdity I'm arguing against. If it was just about making JS look different, there would be no need to use Vue in the first place.
- inimino 10y agoOf course they think the design decisions are superior, since they made them after looking at all the existing options. It seems reasonably balanced to me.
- patsplat 10y agoReact can be quite confusing > https://www.google.com/search?q=React.createClass+versus+extends+React.Component https://www.google.com/search?q=React.createClass+versus+ext...
- bastawhiz 10y agoIt's totally fine to pick one, learn it, and never think about the other. One way is the old way, one way is new. Simple as that. There's never a case where you should use both.
- spyder 10y ago"But after using JSX I'm never going back to a templating system" It looks like you can use JSX with Vue: checkout the code for the benchmark mentioned in the article: https://github.com/chrisvfritz/vue-render-performance-comparisons/blob/master/examples/vue/src/List.js https://github.com/chrisvfritz/vue-render-performance-compar...
- ieatkittens 10y ago> I consider Ecosystem, community, dev resources / backing, encapsulation and reuse integral Yes. No doubt. > which React wins easily I disagree. The old react docs were shite compared to Vue's. Not once did I feel the need to ask google. (Have yet to go through the ones released yesterday) The tools that the team provides (router, vuex, resource, cli, ..) work perfectly. Where react clearly wins is with 3rd party libraries and learning resources. Egghead is a perfect example. Depending on what you prefer one might win over the other, but it's not _clear_ by any means.