javascript 框架_2021年什么将是最好JavaScript框架?

javascript 框架

Anyone who is starting their career as a developer or a software engineer must have faced a problem with choosing which language, framework, or tools they need to learn first. I’m sure all of you must have faced the same situation. The answer to this question is a bit tricky since there are a large number of languages and frameworks available in the software development industry. I thought of doing a comparison of three JavaScript-based frameworks since JavaScript has become the backbone of most development processes.

任何以开发人员或软件工程师的身份开始其职业的人,在选择他们需要首先学习哪种语言,框架或工具时都必须面对问题。 我敢肯定,你们所有人都必须面对同样的情况。 这个问题的答案有些棘手,因为软件开发行业中有大量语言和框架可用。 由于JavaScript已成为大多数开发过程的骨干,因此我想对三个基于JavaScript的框架进行比较。

I have only chosen Angular, React, and Vue for my comparison. First I will bring some major surveys done in the past months into a single place to see what the trending framework is, and then I will talk about the pros and cons of these three frameworks.

我只选择Angular,React和Vue进行比较。 首先,我将把过去几个月中完成的一些主要调查带到一个地方,以了解趋势框架是什么,然后再讨论这三个框架的利弊。

堆栈溢出调查 (Stack Overflow Survey)

Image for post
Stack Overflow 堆栈溢出

In this survey by Stack Overflow to find what the most popular framework is, React and Angular placed second and third, respectively. Last year, Angular had the lead, rather than React. But still, if we consider the responses from professional developers, Angular is ranked in second place, while React is in third place. Despite the rapid development of Vue, this framework is only at the seventh position in the rating.

Stack Overflow进行的这项调查中,发现最受欢迎的框架是什么,React和Angular分别排名第二和第三。 去年,Angular领先,而不是React。 但是,如果考虑专业开发人员的反馈,Angular排名第二,而React排名第三。 尽管VueSwift发展,但该框架仅在评分中排名第七。

NPM趋势 (NPM Trends)

Image for post
NPM Trends NPM趋势

The NPM Trends graph above shows us the number of downloads of each framework overs a period of time. The above screenshot shows the stat over the past year, and we can see React is significantly far ahead of its competitors in this respect. On the other hand, Vue is gradually increasing its number of downloads and currently staying around 1.5 million.

上面的NPM趋势图向我们显示了一段时间内每个框架的下载次数。 上面的屏幕截图显示了过去一年的统计数据,我们可以看到React在这方面远远领先于竞争对手。 另一方面,Vue正在逐渐增加其下载数量,目前保持在150万左右。

Another feature in NPM Trends is that it shows the data from GitHub as well. In the below screenshot, you can see the number of forks, stars, and issues of each framework.

NPM Trends的另一个功能是它也显示来自GitHub的数据。 在下面的屏幕截图中,您可以看到每个框架的分支,星号和问题的数量。

Image for post
NPM Trends NPM趋势

JavaScript状态 (State of JavaScript)

The 2019 State of JavaScript includes another report generation platform on JavaScript, and you can find various kinds of comparisons there. The figure below that I have taken from there shows the responses of the users, whether they will use it again or not, have they heard of the technology, etc.

2019年JavaScript状态包括基于JavaScript的另一个报告生成平台,您可以在那里找到各种比较。 我从那里拍摄的下图显示了用户的响应,无论他们是否会再次使用它,是否听说过该技术,等等。

Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/
图片来源: https : //2019.stateofjs.com/front-end-frameworks/

As we can see, the most numbers of users are likely to use React and Vue again than Angular.

我们可以看到,大多数用户可能会再次使用React和Vue,而不是Angular。

选择角度的原因 (Reasons to Select Angular)

Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/angular/
图片来源: https : //2019.stateofjs.com/front-end-frameworks/angular/

For me, Angular was the place where I started my software development journey, and personally I don't regret my decision. In comparison to the other two frameworks, Angular is a bit more mature, and there is a large community build around Angular. Apart from being part of the famous MEAN stack, Angular provides some great features, like two-way data binding, dependency injection, MVC architecture, Angular CLI, TypeScript support, directives, etc.

对我而言,Angular是我开始软件开发之旅的地方,而我个人并不后悔自己的决定。 与其他两个框架相比,Angular更加成熟,并且围绕Angular建立了一个大型社区。 Angular除了是著名的MEAN堆栈的一部分之外,还提供了一些很棒的功能,例如双向数据绑定,依赖项注入,MVC体系结构,Angular CLI,TypeScript支持,指令等。

But with the rise of its competitors like React and Vue, Angular lost its popularity in the last few years. Being a heavyweight framework, not meeting users' expectations with new updates, limited SEO support, and learning difficulties have affected the popularity of Angular drastically. This is why we see Vue and React becoming more preferable choices today. But Angular is still used to support many popular websites and web apps like the Guardian, Upwork, PayPal, and Sony. All of them are major websites, where Angular proves itself well.

但是随着像React和Vue这样的竞争对手的崛起,Angular在最近几年失去了知名度。 作为一个重量级的框架,新的更新不能满足用户的期望,有限的SEO支持以及学习困难极大地影响了Angular的普及。 这就是为什么我们认为Vue和React在今天成为更可取的选择的原因。 但是Angular仍然用于支持许多流行的网站和Web应用程序,例如Guardian,Upwork,PayPal和Sony。 所有这些都是主要网站,Angular证明了自己的能力。

Angular is mostly important in cases like the following:

在以下情况下,角度最重要:

  • Large scale applications

    大规模应用
  • If you need a scalable architecture

    如果您需要可扩展的架构
  • If you prefer TypeScript

    如果您喜欢TypeScript
  • Creation of real-time applications

    创建实时应用

选择React的理由 (Reasons to Select React)

Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/react/
图片来源: https : //2019.stateofjs.com/front-end-frameworks/react/

According to the State of JavaScript, React has been taking first place in all ratings for the third consecutive year. React was released by Facebook in 2013 with the purpose of the division of the user interface into a set of components to simplify the development process. The ability to use it for native development is one of the major advantages of React, while a large community, support from Facebook, and a saturated ecosystem, better performance, reusable components, and SEO friendliness are some other pros.

根据JavaScript状态 ,React已连续第三年在所有评分中排名第一。 React由Facebook发布 在2013年,其目的是将用户界面划分为一组组件,以简化开发流程。 使用它进行本机开发的能力是React的主要优势之一,而其他一些优点还包括庞大的社区,Facebook的支持以及饱和的生态系统,更好的性能,可重用的组件和SEO友好性。

But sudden updates may have caused a little discussion among developers since they need to update their work to prevent compatible issues. JSX usage and lack of documentation are some other main disadvantages of React.

但是突然的更新可能会引起开发人员之间的讨论,因为开发人员需要更新其工作以防止出现兼容问题。 JSX的使用和缺乏文档是React的其他一些主要缺点。

Usage of React is more appropriate on occasions such as the following:

在以下情况下,更适合使用React:

  • Creating SPA or cross-platform applications

    创建SPA或跨平台应用程序
  • Developing small enterprise-level apps

    开发小型企业级应用

我们为什么要选择Vue? (Why Should We Choose Vue?)

Vue is a discovery of recent years. It has suddenly turned from the ordinary framework into one of the most loved frameworks among the professionals.

Vue是近年来的发现。 它突然从普通框架变成了专业人员中最受欢迎的框架之一。

Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/vuejs/
图片来源: https : //2019.stateofjs.com/front-end-frameworks/vuejs/

Vue has been growing rapidly due to its tiny framework size, detailed documentation, reactivity, reusability, TypeScript support, and easy learning curve. Vue comes a huge number of special aspects. Some of them can even appear to be cons. For example, Vue is very flexible. However, sometimes it can be overly flexible for teams with a large number of developers.

Vue由于其很小的框架大小,详细的文档,React性,可重用性,TypeScript支持和易学习的特性而Swift发展。 Vue有很多特殊方面。 其中一些甚至可能看起来是缺点。 例如,Vue非常灵活。 但是,有时对于拥有大量开发人员的团队来说,它可能过于灵活。

This framework is in heavy demand in the Asian market today. But there are some cons in using Vue, like its lack of support for large-scale projects and its small community. However, there are some specified cases where Vue might be the best solution for you.

如今,亚洲市场对这种框架的需求量很大。 但是使用Vue有一些弊端,例如缺乏对大型项目和小型社区的支持。 但是,在某些特定情况下,Vue可能是最适合您的解决方案。

  • To build small and light-weight applications (e.g. Grammarly)

    建立小型轻量级的应用程序(例如语法)
  • To build smart and high-performance applications

    构建智能和高性能应用程序
  • For an app’s early entry into the market

    为了使应用早日进入市场

结论 (Conclusion)

Based on the above observations, we can conclude that React will be the best framework to learn in 2021, followed by Vue. But there is a high chance of Angular defending second place since it has been there for a longer period of time than Vue, and surely 2021 is not the end of that. So if you are an Angular developer, I suggest you learn React in the upcoming days.

根据以上观察,我们可以得出结论,React将是2021年学习的最佳框架,其次是Vue。 但是Angular卫冕第二名的可能性很高,因为它的存在时间比Vue更长,而且2021年肯定不会结束。 因此,如果您是Angular开发人员,建议您在接下来的几天里学习React。

翻译自: https://medium.com/better-programming/what-will-be-the-best-javascript-framework-in-2021-da4582268419

javascript 框架

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值