Vue.js is good, but will it be better than Angular or React?

Source: Internet
Author: User

Article turned from: Http://www.oschina.net/translate/vuejs-is-good-but-is-it-better-than-angular-or-rea

Vue.js is a JavaScript library used to build a web interface. Together with some other tools, it can also be a new "framework". By reading our most recent post on Valuecoders, you will learn that Vue.js is one of the top-level JavaScript frameworks that can be used to replace Angular and React in many scenarios. This leads to the topic discussed in this article "Vue.js is good, but can be better than Angular or React?"

Related article: Why is JavaScript programming language the future trend of WEB development?

Before the discussion, you may have never heard or used vue.js, and then wondered: stop it! It's just another JavaScript frame! We have taken this into account, but Vue.js is not a new thing. It was first released in 2013 and has been harvested 31,473 times on GitHub, and downloads are huge. Take a look at these two pictures:


As a result, vue.js is not new compared to other frameworks, but the prevalence of each life cycle is not inferior. Now let's see what the advantages of vue.js are.

Why is vue.js more special?

Vue's biggest advantage is that it is relatively new and has no historical baggage. After a thorough study of the valuecoders, we found that it absorbed the lessons of React and Angular, while absorbing their successes. The Vue we see is lightweight and easy to learn.

It has some fairly basic documentation, but it's pretty good, and there's not much to learn from Angular-it's a good thing because it looks strong and it's easy to fear. Pagekit, Python China is two projects that use Vue. Here's a list. It also has two-way data binding like Angular, and a virtual dom like React.

Now, I think you already have a certain understanding of the basic concept of vue.js. Then let's compare him with Angular and React, starting with Angular first.

Angularjs vs Vue.js

In comparing these two, we first qualitatively, if the Angular (mainly Angular 2 release) compared to a mammoth, and vue.js is already very hungry, will soon become strong Tiger. However, there are many reasons why developers will favor Vue. Evan you did the right thing for the owner of the Vue to describe the reason:

"Vue.js is more flexible and less autocratic (than Angular), and it can build your application the way you want it, rather than having to Angular it all in everything." It's just a layer of interface, so you can use it as a lightweight feature in the page instead of a full SPA. "

Now look at the following lines of code to give you some basic knowledge of this (source: fadeit.dk).

Angularjs vs Vue.js Summary: Angularjs has a lot of tools, and so many complex grammars can sometimes make you feel confused. On the other hand, vue.js is much simpler than Angular, even better. If you are worried about the future trend of this framework, I think you don't have to think so much. It takes a long time to keep going, and in the next two years, it will not be obsolete in any way.

Reactjs vs Vue.js

React and Vue.js have some similar features, such as:

1) A virtual DOM is used
2) provides a responsive, modular view component.
3) Maintain focus on the core library, while concerns such as Routing and global State management are given to the accompanying libraries for processing.

Related article: 5 reasons to choose Facebook's Reactjs

This shows that React and vue.js are functionally quite similar. So we want to try each frame from a developer's point of view with a few simple actions, by comparing the two frames to see what happens!
Hello World:

React do this:

Vue does this:

This is very simple. You can use a bunch of script tags to get your code up and running. As you can see, the benefit of using Vue's features is that there is no need to learn any new technology.

bidirectional Data Binding

React do this:


Vue does this:

Two-way data binding in Vue.js is quite simple when you use V-model. And in the React, the process is a bit long.


Iteration

React do this:


Vue does this:

Here, Vue has the advantage of being less code and simpler.

Reactjs vs Vue.js Summary: These examples are meant to mean that vue.js is easier to learn and can quickly form productivity. It also provides a way to simplify the management of large code libraries using new tools and patterns. Vue.js will expand as your knowledge grows, so you can use it to learn the latest tools and best practices.
Profile:

Now, Vue is not React (maintained by Facebook) or Angular 2 (supported by Google). However, many developers have turned to Vue. The Laravel community is also considering it as one of the optional front-end frameworks.

"In short, Vue offers a recipe for React & Angular's ills, providing you with a much simpler and easier way to write code. "

This article was originally published on the Valuecoders.

Vue.js is good, but will it be better than Angular or React?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.