r/webdev • • Sep 29 '16

Why Vue (not React) Is The New jQuery

http://anyonecanlearntocode.com/blog_posts/why-vue-not-react-is-the-new-jquery
0 Upvotes

22 comments sorted by

10

u/alonsoontheweb Sep 29 '16

No JS framework will ever be the new jQuery. There are just way too many now. Vue has been around almost 3 years now and their community is still extremely tiny, and online resources are incredibly limited.

8

u/lykwydchykyn Sep 29 '16

I think what people don't understand about jQuery .. it's not that it's "simple" or "easy", it's that it gives you a bunch of tools and doesn't try to prescribe a way of using them or enforce a certain structure on your application.

Say I've got this old PHP application with no JS, just server-side code. I want to update it to automate some things and bring down the number of page refreshes. I can drop jQuery in there and start doing that bit by bit -- a little DOM manipulation here, a little AJAX there, etc.

If I want to use Angular/React et al, I pretty much have to rewrite the entire application around the front-end framework. It's a paradigm shift in your application design.

5

u/[deleted] Sep 29 '16

Which is why I laugh every time someone insists React isn't a framework.

1

u/[deleted] Sep 29 '16

is vue's presence still tiny? i haven't used it in over a year, but it seems to be the third biggest framework at this point. it's got a lot of praise for being an underdog.

1

u/lolhaskal Sep 29 '16

1

u/[deleted] Sep 30 '16

https://www.google.com/trends/explore?q=reactjs,vuejs,emberjs

I'm unsure why we keep going to google trends to decide whether or not something is popular and in use. It's just showing how much people are googling on a topic. If a framework is currently in the conversation a great deal, it's going to attract a lot of searches. A handful of popular articles/well received conference talks and people go looking for more. It doesn't give any insight into how many adopted it - or perhaps more importantly how many people adopted it in an established business. There is so much more to it than that.

It's just not a terribly useful metric. A better way to look at it is to find organisations which are operating under similar conditions to you and have the same sorts of problems you are facing, then look at their stack. Or look at what is being asked for in the job market (which will differ wildly from place to place). Or look at how active/large/supportive is it's community? Or look at how the project is managed/organised/maintained (is there a high "bus factor", is the decision making process somewhat democratised, etc)... and most importantly, look at whether or not it solves the problems you are currently facing.

I'd take google trends with a grain of salt at best...

1

u/agc93 Oct 01 '16

If things like GitHub, Gitter and SO activity is anything to go by, I certainly wouldn't call it tiny. Corporate adoption is very low, but likely to be improved by the Laravel integration.

I think one of the big differences to remember about Vue.js in terms of community and all that is that it's still basically just one guy working on it.

1

u/mattaugamer expert Sep 29 '16

It's popular in segments of the community, but not more broadly. Not a lot of industry support at this point. It's still Angular, React, and Ember that dominate.

0

u/[deleted] Sep 30 '16

[deleted]

1

u/mattaugamer expert Oct 02 '16

For sure. Its usage is higher at the top end of town, but it definitely doesn't have the mass usage of those two.

0

u/inimrepus Sep 29 '16

I feel like Vue's community will grow by at least a bit. Laravel selecting deciding to integrate Vue.js will attract some people to it.

3

u/headzoo Sep 29 '16

I haven't tried Vue yet, and after reading this article I probably never will. Because, fuck selectors. I'm sick of them. Every app I've build using jQuery grows increasingly difficult to maintain as it grows larger, because changing/removing a CSS class/id on an element may break some JS code buried deep in some js file somewhere. As it appears Vue is also using selectors, I'm just going to pass on that.

3

u/r1ckd33zy Sep 29 '16

Now I have to hurry up and finish my "Why MithrilJS (not Rect or Vue) is the new jQuery" Medium article before the trend dies down /s.

2

u/mattaugamer expert Sep 29 '16

I'm not really sure at what point of intellectual dishonesty I'm allowed to just point and yell "Pants on fire!".

This is staggeringly misconstrued. The React Hello World I saw in the docs actually looks pretty thoroughly different to that. Though the main template is roughly the same, the script block is very different.

<script type="text/babel">
  ReactDOM.render(
    <h1>Hello, world!</h1>,
    document.getElementById('example')
  );
</script>

Basically the same length as the Vue example. Why this uses Babel I have NFI, but that's not the writer's fault, the React docs do use this.

The false comparison continues. React devs use ES2016. React devs need webpack and NPM. But Vue needs exactly the same stuff to work to any practical degree, and the writer surely must know this.

On the one hand it decries React for this sort of complexity, JavaScript fatigue, high cognitive load for newbies, etc, while suggesting that the same doesn't apply to Vue. If you can use Vue in "simple mode" you absolutely can do the same with React. If you can use Vue simply as a beginner and later transition to more advanced approaches, you absolutely can do the same with React. If React requires complex build tools and syntax, so does Vue. This is special pleading on behalf of Vue.

Vue enjoys popularity in the Laravel community, but is barely a blip outside of it. Its official support within the framework - which I think is terrible for a number of irrelevant reasons - is seen as some sort of vindication of it. I don't see it the same. I'm not sure if its "mindshare" is really as great as it claims.

If you have to resort to this sort of dishonesty, I'd argue that the case itself is pretty weak.

1

u/headzoo Sep 29 '16

But Vue needs exactly the same stuff to work to any practical degree

I was thinking the same. As far as I'm concerned, learning React is pretty easy. Primarily because the API is minimal. The build tools on the other hand have a steep learning curve, and the author is basically saying React is hard to learn because the build tools are hard to learn, but like you said.. you need those same build tools regardless of the JS framework you use.

2

u/[deleted] Sep 29 '16

Also, create-react-app exists.

Admittedly, it's basically just a React boilerplate with some extra abstraction, but it seems to be doing well and is developed by Facebook.

1

u/mattaugamer expert Sep 29 '16

Yeah, and so does Vue CLI. The lines between these frameworks are vastly closer than this article wants to imply.

1

u/mattaugamer expert Sep 29 '16

Well... I didn't want to say it, but not all...

1

u/g4b1nagy Sep 29 '16

Fuck. Yer. Scrolljacking.

0

u/lolhaskal Sep 29 '16

Good lord... Haven't we agreed that Vue is for drooling cretins?

I, for one, embrace our new Ember.js overlords.

1

u/Soccham Sep 29 '16

Is Ember new? I thought it was old. I don't know what to think anymore.

1

u/mattaugamer expert Sep 29 '16

It's a dig at me personally. I'm not sure why. Some people take it really seriously when someone has an attitude and expresses it. I'm apparently a shill. Because my opinions differ from his.

I'm beginning to think I inadvertantly insulted the cretin community by the comparison.

0

u/lolhaskal Sep 29 '16

It's new at being our Lord and Saviour.