Vue.js很好,但是比Angular或React更好吗?

In case you’ve never heard or used Vue.js before, you are probably thinking: Come on! yet another JavaScript framework! We get it. However, Vue.js is not new in the custom software development domain. It was first released in 2013 and now it has 130549 stars on Github and downloaded a number of times this year.

如果您以前从未听过或从未使用过Vue.js,您可能在想:加油! 另一个JavaScript框架! 我们懂了。 但是,Vue.js在定制软件开发领域中并不是新的。 它于2013年首次发布,现在在Github上已拥有130549星,并于今年下载了多次。

Here, have a look at the images —

在这里,看看这些图像-

Hence, neither Vue.js is new nor less popular from other frameworks as per its lifetime. Now let’s see what are the winning factors present in Vue.js.

因此,就其生命周期而言,Vue.js既不是新的,也不是在其他框架中不那么流行。 现在,让我们看看Vue.js中存在哪些获胜因素。

Vue.js为什么特别? (Why is Vue.js special? )

The greatest benefit of Vue in the war of Vue vs angular is its absence of pedigree. It is fresh and has little baggage. It has been learning from the mistakes and successes of React & Angular. The way we see it, Vue is lightweight & easy to learn.

Vue与Vue的战争中Vue的最大好处是没有血统书。 它是新鲜的,几乎没有行李。 它一直在从React和Angular的错误和成功中学习。 我们认为Vue轻巧易学。

It has got some fairly basic docs but they do a good job, and while there isn’t a great deal to learn compared to angular – this is a good thing as it’s deceptively powerful. PageKit, Python China are two of the projects using Vue among many. Here’s the list. Also, it has a two-way data binding facility like Angular and Virtual DOM like React.

它有一些相当基础的文档,但是他们做得很好,尽管与angular相比并没有太多要学习的东西-这是一件好事,因为它看似强大。 PageKit,Python China是众多使用Vue的项目中的两个。 这是清单。 此外,它还具有双向数据绑定功能(如Angular)和虚拟DOM(如React)。

Now, we hope your basic concept about Vue.js is quite clear. Hence, before we start discussing React vs Vue vs Angular, let us check their current position:

现在,我们希望您对Vue.js的基本概念很清楚。 因此,在我们开始讨论React vs Vue vs Angular之前,让我们检查一下它们当前的位置:

Now let’s compare it with Angular and React. We will start with Angular-

现在让我们将其与Angular和React进行比较。 我们将从Angular开始-

AngularJS和Vue.js (Angularjs vs Vue.js)

While comparing Vue vs angular, let us first declare that Angular (mostly after the release of Angular 7!!) is a mammoth and Vue.js is the tiger hungry enough to become big soon. However, there are many reasons for which developers are switching to Vue. Evan You, the owner of Vue describes the reason rightly.

在比较Vue与angular时,让我们首先声明Angular(主要是在Angular 7发布之后!)是猛ma的,而Vue.js却饿得要死,很快就会变大。 但是,开发人员选择Vue的原因很多。 Vue的所有者Evan You正确地描述了原因。

Vue.js is a more flexible, less opinionated solution ( than Angular ). That allows you to structure your app the way you want it to be, instead of being forced to do everything the Angular way. It’s only an interface layer so you can use it as a light feature in pages instead of a full-blown SPA.
Now let's see few codes which will give you some basic insights for the war of vue vs angular(credits: fadeit.dk)
Vue.js是一个比Angular更加灵活,见解少的解决方案。 这样一来,您就可以按照自己的方式构建应用程序,而不必被迫以Angular的方式进行任何操作。 它只是一个接口层,因此您可以将其用作页面中的轻型功能,而不必使用成熟的SPA。
现在,让我们来看一些代码,这些代码将为您提供有关Vue与角逐之战的基本见解(来源:fadeit.dk)

The bottom line of Vue.js vs Angularjs: There are many tools in Angularjs and so many complex syntaxes that it can confuse you sometimes. On the other hand, Vue.js is much simpler than Angular and sometimes even better. If you are concerned about the future of this framework, we suggest not to be. This is going to stay for long and no way to fade in the upcoming two years.

Vue.js vs Angularjs的底线:Angularjs中有许多工具,而且还有许多复杂的语法,有时可能会使您感到困惑。 另一方面,Vue.js比Angular简单得多,有时甚至更好。 如果您担心此框架的未来,建议不要这样做。 这将持续很长时间,并且在未来两年内不会消失。

React.js与Vue.js (Reactjs vs Vue.js)

React and Vue.js has some similar features in the war of vue vs angular. They are:

React和Vue.js在vue与angular之战中具有一些相似的功能。 他们是:

  1. Utilize a virtual DOM.

    使用虚拟DOM。
  2. Provide reactive & compose-able view components.

    提供React式和可组合的视图组件。
  3. Keep focus in the core library, with concerns like routing and global state management handled by companion libraries.

    将精力集中在核心库上,关注路由和伴侣库处理的全局状态管理等问题。

This states that React and Vue.js are quite similar feature-wise for a technology consulting company. Hence, we would like to compare these two frameworks from a developer’s perspective with a few simple how-tos for each framework. Let’s see what happens in this Vue js vs Reactjs comparison:

这说明对于技术咨询公司而言,React和Vue.js在功能上非常相似。 因此,我们希望从开发人员的角度将这两个框架与每个框架的一些简单操作方法进行比较。 让我们看看在Vue js与Reactjs的比较中会发生什么:

For Example A «Hello World» program

例如一个“ Hello World”程序

How React Does it:

React如何:

How Vue Does it:

Vue是如何做到的:

Image: anyonecanlearntocode.com 图片:anyonecanlearntocode.com

This is simple. With a single script tag, you’re up and running. The benefit here is that to take advantage of Vue features, without learning any new technologies.

这很简单。 使用单个脚本标签,即可启动并运行。 这样做的好处是无需学习任何新技术即可利用Vue功能。

双向数据绑定 (Two way Data Binding)

How React Does it:

React如何:

How Vue does it:

Vue是如何做到的:

img src:rlafranchi.github.io img src:rlafranchi.github.io

Two way binding in Vue.js is quite simple when you use v-model. In React it's a long way down.

使用v-model时,Vue.js中的两种方式绑定非常简单。 在React中,它还有很长的路要走。

迭代 (Iteration)

How React Does it:

React如何:

How Vue does it:

Vue是如何做到的:

Image: rlafranchi.github.io 图片:rlafranchi.github.io

In this case, also, Vue wins with fewer lines and simplified codes.

同样,在这种情况下,Vue以更少的行数和简化的代码获胜。

The bottom line of Vue.js vs Reactjs: What these examples mean is that Vue.js is easy to learn and can be immediately productive. It also provides a path to simplicity with new tools and patterns for managing large codebases. Vue.js can scale up with your knowledge so that you can start to learn the updated tools and best practices.

Vue.js vs Reactjs的底线:这些示例的意思是Vue.js易于学习并且可以立即产生成果。 它还通过用于管理大型代码库的新工具和模式提供了简化的途径。 Vue.js可以根据您的知识进行扩展,以便您可以开始学习更新的工具和最佳实践。

Angularjs vs Vue.js vs Reactjs表 (Angularjs vs Vue.js vs Reactjs Table)

Here is a table that would provide you a few valuable information about these three frameworks –

下表提供了有关这三个框架的一些有价值的信息-

底线 (The bottom line)

In today’s time, Vue is not as much popular as React (maintained by Facebook) or Angular 2 & 4 (supported by Google). However, many developers are switching to Vue. Laravel community has also considered it as one of their preferred front-end frameworks.

在当今时代,Vue不如React(由Facebook维护)或Angular 2&4(由Google支持)流行。 但是,许多开发人员正在切换到Vue。 Laravel社区也将其视为他们偏爱的前端框架之一。

Overall, Vue provides an answer to the issue of React & Angular and gives you much simpler and easier way to code.
Originally Published at:
总体而言,Vue为React和Angular问题提供了答案,并为您提供了更简单,更轻松的编码方法。
最初发布于: Vue.js vs Angular.js vs React.js Vue.js vs Angular.js vs React.js

翻译自: https://habr.com/en/post/471256/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值