2020年用于前端开发的顶级JavaScript框架

Front-end developers might know this game already: you type “top JavaScript frameworks” into Google and you get so many JavaScript frameworks from which to choose.

前端开发人员可能已经知道这个游戏:您在Google中输入“顶级JavaScript框架”,您就会获得很多JavaScript框架供您选择。

There are always more choices for JavaScript frameworks. And it's always tough to choose a JavaScript framework for front-end development.

JavaScript框架总是有更多选择。 选择前端开发JavaScript框架总是很困难。

So, what are front-end developers looking for in their tech stacks? As a full-time developer, I know it comes down to rapid development and easy-to-make UIs.

那么,前端开发人员在技术堆栈中寻找什么呢? 作为一名专职开发人员,我知道这取决于快速开发和易于制作的UI。

Rather than try to be decisive, we, 450+ developers at ValueCoders software development company, voted and shortlisted a few of the best JavaScript frameworks.

ValueCoders软件开发公司的 450多个开发人员并没有做出决定性的决定,而是投票选出了一些最佳JavaScript框架,并入围了其中。

我们的投票会做出React (Our Vote Goes to React)

I was not surprised to see this. Most of our developers voted for React as one of the best JavaScript frameworks. There have been plenty of projects along the way that our front-end developers are handling that highlighted the strengths of the JS framework. React provides a combination of the following:

看到这一点我并不感到惊讶。 我们的大多数开发人员都将React视为最佳JavaScript框架之一。 我们的前端开发人员正在处理许多项目,这些项目突出了JS框架的优势。 React提供以下内容的组合:

  • Reusable components

    可重复使用的组件
  • Synchronization of state and view

    状态和视图的同步
  • Routing and template system

    路由和模板系统

Our developers implement front-end logic by relying heavily on React. At the same time, I was surprised by how simple it was to create  applications with React.

我们的开发人员通过高度依赖React来实现前端逻辑。 同时,令我惊讶的是,使用React创建应用程序如此简单。

这是我们的应用程序概述 (Here is an Overview of Our App)

The application is simple. It’s a studio management app for music teachers that helps them focus more on their teaching and less on the management of their music studio.

该应用程序很简单。 这是一个针对音乐教师的录音室管理应用程序 ,可帮助他们将更多的精力放在教学上,而不是音乐录音室的管理上。

The key challenge was creating one ‘Activity Dashboard’ for teachers where they could manage all their students' activities and track their progress over time. We overcame this challenge by using Redux libraries to build the platform. We built a teacher’s studio from where they could manage their students' progress, showcase new music lessons, chat with them, compare students music playing with live music, and provide them feedback.

关键的挑战是为教师创建一个“活动仪表板”,以便他们管理所有学生的活动并跟踪他们的进度。 我们通过使用Redux库构建平台来克服了这一挑战。 我们建立了一个教师工作室,从那里他们可以管理学生的进度,展示新的音乐课,与他们聊天,将学生的音乐演奏与现场音乐进行比较并提供反馈。

So, this is my experience with React JS. But many would argue that Vue is one of the best front-end JavaScript frameworks with many useful tools.

因此,这就是我对React JS的经验。 但是许多人认为Vue是具有许多有用工具的最好的前端JavaScript框架之一。

Front-end developers are the ones deciding which JavaScript framework will do the job. In doing so, they face a lot of challenges because they need to decide what they’ve always needed. Often, we have to choose a JavaScript framework now, not after a week of research. In that case, most developers go with what they know. But maybe the stacks you’re familiar with are no longer cutting it in terms of performance.

前端开发人员负责确定哪种JavaScript框架将完成这项工作。 在这样做时,他们面临许多挑战,因为他们需要决定自己始终需要的东西。 通常,我们必须立即选择JavaScript框架,而不是经过一周的研究。 在这种情况下,大多数开发人员都会采用他们所知道的。 但是也许您所熟悉的堆栈不再降低性能。

Even just choosing among Angular, React, an Vue, it is difficult for new developers. Rather than making it more exhaustive for you, here is the list of the top JavaScript frameworks for front-end developers.

即使只是在Angular,React,Vue中进行选择,新开发人员也很难做到。 这不是为您提供更详尽的说明,而是为前端开发人员提供的顶级JavaScript框架列表。

5大JavaScript框架 (The Big 5 JavaScript Frameworks )

The five JavaScript frameworks that currently dominate the market in terms of popularity and usage are:

目前,在流行度和使用率方面占据主导地位的五个JavaScript框架是:

  • React

    React
  • Vue

    Vue
  • Angular

    角度的
  • Ember

    余烬
  • Backbone.js.

    Backbone.js。

They each have large communities. If you are a front-end developer or are going to start your new project on front-end technologies, these five are your best bets. Here’s a look at the npm trends over the last six months.

他们每个人都有大社区。 如果您是前端开发人员或要开始使用前端技术的新项目,那么这五个是最好的选择。 以下是过去六个月的npm趋势。

1.React (1. React )

React is the definite leader in the JS world. This JavaScript framework uses a reactive approach and also introduces many of its own concepts for front-end web development.

React是JS世界中的绝对领导者。 该JavaScript框架使用了React式方法,并且还为前端Web开发引入了许多其自己的概念。

To use React , you’ll have to learn to use a plethora of additional tools to reach high flexibility in front-end development. For example, here's a less exhaustive list of libraries you can use with React: Redux, MobX, Fluxy, Fluxible, or RefluxJS. React can also be used with jQuery AJAX, fetch API, Superagent, and Axios.

要使用React,您必须学习使用大量其他工具才能在前端开发中达到高度的灵活性。 例如,以下是可用于React的库的较不详尽的列表:Redux,MobX,Fluxy,Fluxible或RefluxJS。 React也可以与jQuery AJAX,fetch API,Superagent和Axios一起使用。

并发模式 (Concurrent Mode)

React is constantly working towards improving concurrent mode. To take this forward, React Conf 2019 wrapped up last month where the React team talked about improving Concurrent Mode and the Suspense model. Both the features make React apps more responsive by rendering trees without blocking threads. This allows React to focus on high priority tasks like responding to user input.

React一直在努力改善并发模式。 为了实现这一目标,React Conf 2019在上个月结束了总结,React团队讨论了改进并发模式和Suspense模型 。 这两个功能都可以通过渲染树而不会阻塞线程,从而使React应用程序的响应速度更快。 这使React可以专注于高优先级任务,例如响应用户输入。

悬念 (Suspense)

React also introduced Suspense to improve the developer’s experience when handling asynchronous data fetching in React apps. In short, the new update to Suspense lets the component wait until a condition is met.

React还引入了Suspense,以改善开发人员在React应用中处理异步数据获取时的体验。 简而言之,对Suspense的新更新使组件可以等待直到满足条件。

Hooks are another important update to React 16.8. React hooks lets you use every important feature of React – server-side rendering, accessibility, concurrent mode, and suspense – all without writing a class.

挂钩是对React 16.8的另一个重要更新。 使用React钩子 ,您无需编写类即可使用React的每个重要功能-服务器端渲染,可访问性,并发模式和暂停。

React applications are divided into multiple components that contain both business logic and HTML markup functions. To improve the communication between components, developers can use either Flux or a similar JavaScript library.

React应用程序分为多个组件,这些组件同时包含业务逻辑和HTML标记功能。 为了改善组件之间的通信,开发人员可以使用Flux或类似JavaScript库。

React also introduced objects, like state and props. With the state and props objects, you can simply pass data from a component to the layout or from a parent component to a child component.

React还引入了对象,例如状态和道具。 使用state和props对象,您可以简单地将数据从组件传递到布局,或从父组件传递到子组件。

Introduction to the React ecosystem:

React生态系统简介:

  • The React library plus React router for implementing routes.

    React库以及用于实现路由的React路由器。
  • React-DOM for DOM manipulation.

    用于DOM操作的React-DOM 。

  • React developer tools for Firefox and Chrome browsers.

    用于Firefox和Chrome浏览器的React开发人员工具。
  • React JSX, a markup language that mixes HTML into JavaScript.

    React JSX ,一种将HTML混合到JavaScript中的标记语言。

  • React Create App command line interface to set up a React project.

    React Create App命令行界面以设置一个React项目。
  • Redux and Axios libraries to organize communication with the backend team.

    Redux和Axios库可组织与后端团队的通信。

No doubt, React is one of the most popular JavaScript frameworks. And, I think that React can be your first choice for creating advanced-grade apps.

毫无疑问,React是最受欢迎JavaScript框架之一。 而且,我认为React可以是您创建高级应用程序的首选。

2.角度2至角度9 (2. Angular 2 to Angular 9)

Angular 9 will mark a turning point revealed by the Angular team at the recent AngularConnect 2019. According to the update, the team is planning to make the Angular Ivy compiler available for all apps. The main benefit of Angular Ivy is that it is able to reduce the size of applications.

Angular 9将标志着Angular团队在最近的AngularConnect 2019上揭示的一个转折点。根据更新,该团队计划使Angular Ivy编译器可用于所有应用程序。 Angular Ivy的主要好处是它可以减小应用程序的大小。

Angular today has become very advanced and modular to use for front-end development. Previously you could insert a link to the AngularJS library in the main HTML file, but now you can do the same by installing separate modules.

如今,Angular已经变得非常先进并且模块化,可用于前端开发。 以前,您可以在主HTML文件中插入指向AngularJS库的链接,但是现在,您可以通过安装单独的模块来做同样的事情。

Angular's flexibility is commendable. That’s why Angular's 1.x versions are still in demand. However, many developers currently rely on Angular 2+ because of its MVC architecture which has changed substantially to a component based architecture.  

Angular的灵活性值得称赞。 这就是为什么仍然需要Angular 1.x版本的原因。 但是,由于Angular 2+的MVC架构已大大改变为基于组件的架构,因此目前许多开发人员都依赖于Angular 2+。

Angular has a couple of additional challenges. You're almost obliged to use TypeScript to ensure type safety in Angular apps. TypeScript makes the Angular 2+ framework not so pleasant to work with.

Angular还有一些其他挑战。 您几乎必须使用TypeScript来确保Angular应用程序中的类型安全。 TypeScript使Angular 2+框架使用起来不太愉快。

Angular’s ecosystem is comprised of:

Angular的生态系统包括:

  • For quick project setup, Angular's command line interface is helpful.

    为了快速进行项目设置,Angular的命令行界面非常有用。
  • Developers will get a set of modules for Angular projects: @angular/common, @angular/compiler, @angular/core, @angular/forms, @angular/http, @angular/platform-browser, @angular/platform-browser-dynamic, @angular/router, and @angular/upgrade.

    开发人员将获得一组用于Angular项目的模块:@ angular / common,@ angular / compiler,@ angular / core,@ angular / forms,@ angular / http,@ angular / platform-b​​rowser,@ angular / platform-b​​rowser-动态,@ angular /路由器和@ angular /升级。
  • Angular uses Zone.js a JavaScript library to implement zones in Angular apps.

    Angular使用Zone.js JavaScript库在Angular应用中实现区域。
  • TypeScript and CoffeeScript both can be used with Angular.

    TypeScript和CoffeeScript均可与Angular一起使用。
  • For communication with server-side apps, Angular uses RxJS and the Observable pattern.

    为了与服务器端应用程序通信,Angular使用RxJS和Observable模式。
  • Angular Augury for debugging Angular apps.

    Angular Augury用于调试 Angular应用。

  • Angular Universal for creating server-side apps with Angular.

    Angular Universal,用于使用Angular创建服务器端应用程序。

Angular2 is a complete JavaScript framework with all the tools a modern front-end developer needs. You can choose Angular if you don’t like to work with additional libraries as with React.

Angular2是一个完整JavaScript框架,其中包含现代前端开发人员所需的所有工具。 如果您不希望像React那样使用其他库,则可以选择Angular。

3. Vue (3. Vue)

The Snyk JavaScript framework report for 2019 is out. The report mainly focused on security risks in both React and Angular.

2019年的Snyk JavaScript框架报告已发布。 该报告主要关注React和Angular中的安全风险。

The concept of Vue has been taken from Angular and React, but Vue is better in many ways. I’ll talk about its features, but first check out what the Synk report says about Vue's front-end security. Vue has been downloaded 40 million times this year and records only four direct vulnerabilities. All of them have been fixed.

Vue的概念来自Angular和React,但是Vue在许多方面都更好。 我将讨论其功能,但首先查看Synk报告对Vue的前端安全性有何评论 。 Vue今年已被下载4000万次,仅记录了四个直接漏洞 。 所有这些都已修复。

For any front-end developer unfamiliar with Vue, let’s clarify several points.

对于不熟悉Vue的任何前端开发人员,让我们澄清几点。

With Vue you store component logic and layouts along with stylesheets in one file. This is the same way React works, without stylesheets. To let components talk to each other, Vue uses the props and state objects. This approach also existed in React before Vue adopted it.

使用Vue,您可以将组件逻辑和布局以及样式表存储在一个文件中。 这与没有样式表的React工作方式相同。 为了让组件彼此对话,Vue使用道具和状态对象。 在Vue采用之前,这种方法也存在于React中。

Similar to Angular, Vue wants you to mix HTML layouts with JavaScript. You have to use Vue directives such as v-bind or v-if to interpolate values from the component logic to templates.

与Angular相似,Vue希望您将HTML布局与JavaScript混合使用。 您必须使用vue指令(例如v-bind或v-if)将值从组件逻辑插值到模板。

One of the reasons why Vue is worth considering instead of React is because of the Redux library that’s often used in large-scale React applications. As explained in the React section, when a React+Redux app grows bigger, you’ll spend a lot of time applying small changes to multiple files instead of actually working on features. The Vuex library – a Flux-like state management tool designed for Vue – seems less unwieldy than Redux.

之所以值得考虑使用Vue而不是React的原因之一是因为Redux库经常在大型React应用程序中使用。 如React部分所述,当React + Redux应用程序变得更大时,您将花费大量时间对多个文件进行小的更改,而不是实际使用功能。 Vuex库-一种为Vue设计的类似Flux的状态管理工具-似乎比Redux轻巧。

If you're choosing between Vue and Angular, the reasons to opt for Vue over Angular can be reduced to the following: Angular is an over-complicated, full-fledged framework with a restrictive nature; Vue is much simpler and less restrictive than Angular.

如果您在Vue和Angular之间进行选择,那么选择Vue而不是Angular的原因可以归结为以下几点:Angular是一个过于复杂,功能全面的框架,具有限制性; 与Angular相比,Vue更简单且限制更少。

Another advantage of Vue over Angular and React is that you don’t have to learn JavaScript once more.

Vue与Angular和React相比的另一个优点是您不必再次学习JavaScript。

An introduction to the VueJS ecosystem:

VueJS生态系统简介:

  • Vuex comes with a dedicated library for application management.

    Vuex带有专用于应用程序管理的库。
  • Vuex is similar to the concept of Flux.

    Vuex与Flux的概念相似。
  • You will get Vue-loader for components and vue.js devtools for Chrome and Firefox browsers.

    您将获得用于组件的Vue-loader和用于Chrome和Firefox浏览器的vue.js devtools。
  • Vue-resource and Axios tools for communication between Vue and the backend source.

    Vue资源和Axios工具,用于Vue与后端源之间的通信。
  • Vue.js support Nuxt.js for creating server-side applications with Vue; Nuxt.js is basically a competitor to Angular Universal.

    Vue.js支持Nuxt.js来使用Vue创建服务器端应用程序; Nuxt.js基本上是Angular Universal的竞争对手。
  • You will get a Weex JavaScript library with Vue syntax that is used for mobile app development.

    您将获得具有Vue语法的Weex JavaScript库,该库用于移动应用程序开发。

Vue is excellent in terms of its workflow to other frameworks. I might opt for Vue because it’s less complicated than React and Angular JS and a great choice for developing enterprise-level apps.

Vue在其他框架的工作流程方面非常出色。 我可能会选择Vue,因为它不如React和Angular JS复杂,并且是开发企业级应用程序的绝佳选择。

4.灰烬 (4. Ember)

Ember 3.13 released this year with some new updates and features. Ember is just like Backbone and AngularJS, and is also one of the oldest JavaScript frameworks. But with the new update, Ember 3.13 is compatible with new bug fixes, performance improvements, and deprecation. Tracked property updates have also been introduced that allow simpler ways of tracking state change in the ergonomic system of Ember apps.

Ember 3.13今年发布了一些新的更新和功能。 Ember就像Backbone和AngularJS一样,也是最古老JavaScript框架之一。 但是,有了新的更新, Ember 3.13与新的错误修复,性能改进和弃用兼容。 还引入了跟踪属性更新,该跟踪属性更新允许在Ember应用程序的人体工程学系统中以更简单的方式跟踪状态更改。

Ember has a relatively intricate architecture, which will allow you to quickly build huge client-side applications. It realizes a typical MVC JavaScript framework, and Ember’s architecture comprises the following parts: adapters, components, controllers, helpers, models, routes, services, templates, utils, and addons.

Ember具有相对复杂的体系结构,它将使您能够快速构建庞大的客户端应用程序。 它实现了一个典型的MVC JavaScript框架,Ember的体系结构包括以下部分:适配器,组件,控制器,助手,模型,路由,服务,模板,utils和附加组件。

One of Ember’s best features is its command line interface tool. The Ember CLI helps front-end developers be highly productive and lets them complete projects on time. You can not only create new projects with ready setups, but you can also create controllers, components, and project files using automatic generation.

Ember的最佳功能之一是其命令行界面工具。 Ember CLI帮助前端开发人员提高生产力,并让他们按时完成项目。 您不仅可以使用现成的设置创建新项目,还可以使用自动生成功能来创建控制器,组件和项目文件。

The EmberJS ecosystem is comprised of:

EmberJS生态系统包括:

  • Ember CLI tool for quick prototyping and managing dependencies.

    Ember CLI工具,用于快速制作原型和管理依赖项。
  • Ember server built into the framework for the development of apps.

    内置到应用程序开发框架中的Ember服务器。
  • You'll get Ember.js library and Ember Data for data management.

    您将获得Ember.js库和用于数据管理的Ember Data。
  • Handlebars template engine for Ember applications.

    用于Ember应用程序的车把模板引擎。
  • QUnit testing framework for Ember.

    用于Ember的QUnit测试框架。
  • Ember Inspector development tool for Chrome and Firefox browsers.

    用于Chrome和Firefox浏览器的Ember Inspector开发工具。
  • Ember Observer for public storage and Ember addons to implement generic functionalities.

    用于公共存储的Ember观察器和用于实现通用功能的Ember插件。

Although Ember is underrated, it's perfect for creating complex client-side apps.

尽管Ember被低估了,但它非常适合创建复杂的客户端应用程序。

5. Backbone.js (5. Backbone.js)

Backbone is a JavaScript framework based on the MVC architecture. In Backbone.js, the View of MVC helps implement component logic similarly to a Controller. Backbone view can use engines like Mustache and Underscore.js.

骨干网是一个基于MVC架构JavaScript框架。 在Backbone.js中,MVC的视图类似于Controller来帮助实现组件逻辑。 骨干视图可以使用诸如Mustache和Underscore.js之类的引擎。

Backbone is an easy to use JavaScript framework that allows for quick development of single page applications. To use Backbone.js to the fullest extent, you’ll have to choose tools: Chaplin, Marionette, Thorax, Handlebars or Mustache, and so on.

骨干网是一个易于使用JavaScript框架,可用于快速开发单页应用程序。 要最大程度地使用Backbone.js,您必须选择工具:卓别林,木偶,胸部,手把或小胡子,等等。

If you need to design an app that has different types of users, Backbone collections (arrays) can be used here to separate the models. Backbone.Events can be used with Backbone models, collections, routes, and views.

如果您需要设计具有不同类型用户的应用程序,则可以在此处使用Backbone集合(数组)来分离模型。 Backbone.Event可以与Backbone模型,集合,路线和视图一起使用。

Introducing the BackboneJS ecosystem:

介绍BackboneJS生态系统:

  • The Backbone library consists of events, models, collections, views, and router.

    骨干库由事件,模型,集合,视图和路由器组成。
  • Underscore.js, a JavaScript library with helper functions that you can use to write cross-browser JavaScript.

    Underscore.js,一个具有帮助程序功能JavaScript库,您可以用来编写跨浏览器JavaScript。
  • You can use template engines such as Mustache and jQuery-tmpl.

    您可以使用模板引擎,例如Mustache和jQuery-tmpl。
  • BackPlug online repository with a lot of ready solutions for Backbone-based apps.

    BackPlug在线存储库,其中包含许多针对基于Backbone的应用程序的现成解决方案。

  • Backbone generator CLI for building Backbone apps.

    用于生成骨干应用程序的骨干生成器CLI。
  • Marionette, Thorax, and Chaplin JavaScript libraries to develop an advanced architecture for Backbone apps.

    Marionette,Thorax和Chaplin JavaScript库可为Backbone应用程序开发高级架构。

Backbone.js is a perfect choice for front-end and back-end development as it supports REST APIs that are used to synchronize the front-end and back-end.

Backbone.js是前端和后端开发的理想选择,因为它支持用于同步前端和后端的REST API。

需要更多帮助吗? (Need More Help?)

All front-end developers out there, if you need help with JavaScript frameworks, feel free to get in touch. Or, you can also contact us to hire ReactJS developers, Vue developers, or Angular developers.

如果您需要JavaScript框架方面的帮助,所有在那里的前端开发人员都可以随时联系 。 或者,您也可以与我们联系以雇用ReactJS开发人员 ,Vue开发人员或Angular开发人员。

Or, leave me a note or Tweet out to me.

或者,给我留言或发推文给我。

Remember this article gives you a general roadmap on JavaScript frameworks. Tell me if I have missed something, and we can discuss that. I hope it will also help achieve your front-end development goals.

请记住,本文为您提供了有关JavaScript框架的一般路线图。 告诉我是否错过了什么,我们可以讨论。 我希望它也将有助于实现您的前端开发目标。

翻译自: https://www.freecodecamp.org/news/complete-guide-for-front-end-developers-javascript-frameworks-2019/

你可能感兴趣的:(java,编程语言,python,数据库,vue)