jQuery vs Vue.js: What are the differences?
What is Vue.js? Reactive Components for Modern Web Interfaces. Vue.js is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API.
"Cross-browser", "Dom manipulation" and "Power" are the key factors why developers consider jQuery; whereas "Simple and easy to start with", "Good documentation" and "Components" are the primary reasons why Vue.js is favored.
jQuery and Vue.js are both open source tools. It seems that Vue.js with 142K GitHub stars and 20.4K forks on GitHub has more adoption than jQuery with 51.8K GitHub stars and 18.2K GitHub forks.
According to the StackShare community, jQuery has a broader approval, being mentioned in 4019 company stacks & 2547 developers stacks; compared to Vue.js, which is listed in 819 company stacks and 1170 developer stacks.
What is jQuery?
What is Vue.js?
Need advice about which tool to choose?Ask the StackShare community!
Sign up to add, upvote and see more prosMake informed product decisions
Sign up to get full access to all the companiesMake informed product decisions
Sign up to get full access to all the tool integrationsMake informed product decisions
I'm building a new process management tool. I decided to build with Rails as my backend, using Sidekiq for background jobs. I chose to work with these tools because I've worked with them before and know that they're able to get the job done. They may not be the sexiest tools, but they work and are reliable, which is what I was optimizing for. For data stores, I opted for PostgreSQL and Redis. Because I'm planning on offering dashboards, I wanted a SQL database instead of something like MongoDB that might work early on, but be difficult to use as soon as I want to facilitate aggregate queries.
I use jQuery because like other frameworks/libraries it handles significant amounts of boilerplate and heavy lifting compared to crafting your own UI tooling. Certainly more modern options such as Angular/Vue/React overcome some of the challenges in large jQuery based applications, but if you just need some straightforward DOM manipulation on a small scope, why not jQuery?
If jQuery or vanilla are the only two options available, then use the library that's available when its features will avoid having to reinvent wheels. Look at what jQuery offers, and look at the things you want to do. If a handmade solution doesn't require a lot of extra effort, then don't bother.
Most jQuery methods can be replaced with native code. I rather use a dedicated library for any exceptions. For example, axios.get is much better than $.get. Also, you can pick any number of animation libraries that are better than jQuery.
However, I don't mind using it in a team environment where communication & maintainability > code size. jQuery can help in those cases because most team members will know jQuery.
We are phasing out jQuery and jQuery UI in favour or Vue.js and @Vue-cli so we can support building a modern, well-architectured frontend.
I use Vue.js because I find the resulting code cleaner, more concise and easier to read.
However if you are looking for the broader community and wider corporate level adoption, go for react. Both work well and I have used both successfully. For me the preference for vue is a matter of personal taste with regards to code aesthetics.
I use Vue.js because it allows me to keep dev momentum. Vue includes many things out of the box that React doesn't include while remaining "lighter" than angular. For example: - Vue single file components include template, logic and styling out of the box. It also allows you to use language parsers such as Pug to write your component template and SCSS for styling. - Vue uses a simple Object to initialize an instance - Vue has support for transitions out of the box (say, for example, a fade in-out between component swaps, or adding an element to a list) - Vue has observers and two way binding like angular - Vue can conditionally render content in templates via template conditional tags
It really depends on your needs. Vue is most popular on Github but React has a huge demand in hiring (Mostly to convert existing angular or legacy applications to React). React is backed by Facebook and has more highly skilled contributors than Vue, though not to detract a single bit from Vue's own skilled contributors. If you're looking for developers, it's much easier to find seasoned react devs, at least as of Jul 2019. If you're a marketing or news agency that has deadlines, Vue's efficiencies may be the best, however, a large corporation may favour React since it has more support and is more of an "open slate" so to speak.