It seems almost every other week there is a new JavaScript library taking the web community by storm! The web community is increasingly vibrant, diverse and is moving rapidly on multiple fronts. It would be an impossible feat to survey every major JavaScript framework and library. Instead, I will share some of the most famous and influential ones for front-end development. So let’s take a look at the top JavaScript web front-end framework, libraries & tools and when to use them.

Also:

  • Please do not be offended if I did not include your favorite JavaScript thing here.
  • Always remember to keep your frameworks & libraries updated. The latest version often has the best cross-browser and cross-device support. You can use tools like this scanner to help determine if an older version is compatible with the largest set of devices.

Alright, let’s get to the list!

AngularJS

Angular is the popular enterprise framework that many developers are using to build and maintain complex web applications. Angular’s popularity is immense, and companies using it are as diverse as Domino’s Pizza, Ryanair, iTunes Connect, PayPal Checkout, Google. Angular is an open source framework supported by Google. Angular describes itself as an extension to HTML for building complex web apps. Also if you’re familiar with TypeScript, that’s how Angular 2 was written.

Angular is an MVC-type framework. It offers two-way data binding between models and views. This data binding allows for an automatic update on both sides whenever there is a data change. It enables you to build reusable View Components. It provides a services framework to allow easily backend-frontend server communication. Finally, it is just plain JavaScript.

When to use AngularJS? When you are building a complex web front-end application and need a single modular framework to handle everything.

GitHub: https://github.com/angular/angular.js

Current Version: 1.4.7/1.2.29

Website: angularjs.org

React

React is this year’s favorite JavaScript project! Everyone seems to be talking about ReactJS. Every conference I have been to in the last year had at least a couple of talks on React and other libraries in the same family (Flux,Redux) React is open-source and developed mostly by Facebook with contributions from other major tech companies. React describes itself as a JavaScript library for building user interfaces.

React is mostly the V in MVC. It focuses entirely on that piece of MVC and disregards the architecture of the rest of your application. It provides a component layer that makes it easier to make UI elements and combine them together. It abstracts the DOM away so that it optimizes rendering and allows you to render React from node.js. Further; it implements a one-way reactive data flow that makes it easier to understand and use than other frameworks.

Being the V in MVC, several projects combine React with the likes of Angular or Ember.

When to use React? When you want a powerful View layer but don’t need an elaborate framework for the rest of your application or when you want a View layer to go with your Angular, Backbone, or Ember application. When you are trying to build an isomorphic web framework.

GitHub: https://github.com/facebook/react

Current Version: v0.14.0

Website: Facebook.github.io/react/

Backbone

Backbone is a famously simple framework that fits into a single JavaScript file. Backbone has been around for a while; developed by Jeremy Ashkenas from CoffeeScript and Underscore fame. Backbone is especially popular with teams looking for a simple structure for their small web applications without bringing in a large framework like Angular or Ember.

Backbone provides a full MVC framework along with routing. The Models allow for key-value binding and events for handling data changes. Models (and Collections) can connect to RESTful APIs. The Views have declarative event handling, and the Router does an excellent job of handling your URL and state management. Everything you need to build a Single Page Application without offering too much and without unnecessary complexity.

When to use Backbone? Backbone is my GOTO framework for simple web applications.

GitHub: https://github.com/jashkenas/backbone/

Current Version: 1.2.3

Website: backbonejs.org

Ember

Ember is an opinionated web app framework focusing on programmer productivity. Ember is relatively popular, and the core team includes smart people like Yehuda Katz, who was part of the Ruby on Rails and jQuery Core Teams. Ember describes itself as "a framework for creating ambitious web applications" that doesn’t waste your time. It is very opinionated and makes many choices for you.

Ember is also an MVC framework. It includes a templating and view engine that automatically updates when data changes, just like Angular, Backbone, and React. It includes the concept of web components that let you extend HTML with your own tags (just like Angular). It also has a routing and model engine that knows how to work with your RESTful API.

When to use Ember? When you just want a framework that just works. Use Ember when you do not need flexibility because you are on a tight budget or a hard deadline.

GitHub: https://github.com/emberjs/ember.js

Current Version: 2.1.0

Website: emberjs.com

JQuery

JQuery is the library that needs no introduction. It is single-handedly responsible for making cross-browser sites a reality and for bringing the web to where it is today. Web Standards have been adopted and genuinely respected by most major browser manufacturers and jQuery is one of the reasons why. The mission of jQuery Foundation is "to improve the open web, making it accessible for everyone, through the development and support of open source software, and collaboration with the development community."

JQuery is the most used JavaScript library in the world, and no app should ever go without it unless you dislike programmer productivity. It makes DOM traversal, event handling, animation, AJAX so much simpler and easier across all browsers.

When to use jQuery? Always, unless you want to use a lighter-weight version like Zepto.

GitHub: https://github.com/jquery/jquery

Current Version: v1.11.3 or v2.1.4

Website: jquery.com

Underscore & lodash

Sometimes what comes built-in to JavaScript is just not enough for programmers to be truly productive. There’s always a utility function that is missing or a function that would simplify the code. Underscore (and lodash) is a JavaScript library that provides a whole suite of utility functions without monkey patching the built-in JavaScript objects. Both libraries provide over 100 functional helpers and other specialized goodies; including functions like map, filter, invoke, reduce, template, throttle, bind, extend, pick, clone and so much more.

When to use Underscore? When you want a single JavaScript file that immediately augments programmer productivity.

Underscore GitHubhttps://github.com/jashkenas/underscore

Underscore Current Version: 1.8.3

Underscore Websiteunderscorejs.org

When to use lodash? When you want a modular and slightly more performant version of Underscore with easier support for AMD and community plugins.

Lodash GitHubhttps://github.com/lodash/lodash

Lodash Current Version: v3.10.1

Lodash Website: lodash.com

D3.js

Data visualization and charting is a common requirement for web applications. D3.js is the defacto standard when it comes to any data manipulation and visualization. It is one of the most popular projects on GitHub and is used by hundreds of organizations. Plenty of graphing, charting and visualization libraries build on top of D3.

D3 allows you to manipulate data documents from any source and apply a transformation into the DOM or/and SVG or/and CSS. D3 focuses on modern web standards and ensures you are free from any proprietary format like Flash or Silverlight.

When to use D3.js? Anytime you need visualization of any kind.

GitHubhttps://github.com/mbostock/d3

Current Version: 3.5.6

Website: d3js.org

Babylon.js

Looking to build a video game that runs entirely on modern web standards and across browsers? Take a look at Babylon.js, a 3d game engine based on WebGL and JavaScript. You can create incredibly high-quality games complete with physics, audio and particle systems among other things.

When to use Babylon.js? Whenever you are building a video game or a complex 3D scene of any sorts.

GitHubhttps://github.com/BabylonJS/Babylon.js

Current Version: 2.2

Website: babylonjs.com

Three.js

Want to build a 3D visualization but do not need a full-blown game engine? Three.js provides a lightweight 3D library that allows rendering 3D to an HTML5 canvas, SVG, and WebGL. It is quite a straightforward library, and there are hundreds of beautiful examples in the three.js showcase.

When to use Three.js? Whenever you need a simple 3D visualization that can output to a Canvas.

GitHubhttps://github.com/mrdoob/three.js/

Current Version: r73

Website: threejs.org

Mocha & Chai

Testing JavaScript has been incredibly annoying for a long time. Scratch that, testing any code is typically seen as annoying, but it is something that every developer should do. Instead of testing their code, every developer seems always to disdain and ignore it. There is a fix to this hatred, and it comes in the form of Mocha and Chai. While both libraries take their names from yummy hot beverages, both libraries do help you test your code but in different ways.

Mocha is a JavaScript test framework that makes it easy to test the async code in your node module or browser app. Mocha tests can run in series and have the added quality of tracing exceptions to the correct test cases.

Chai is a behavior-driven development/test-driven development assertion library that can be paired with Mocha. It makes it simple to express what you are testing in a readable style.

When to use Mocha & Chai? ALWAYS! Please test your code and make the world a better place.

Mocha GitHub: https://github.com/mochajs/mocha

Mocha Current Version: 2.3.3

Mocha Website: mochajs.org

Chai GitHub: https://github.com/chaijs/chai

Chai Current Version: v3.4.1

Chai Website: chaijs.com

Karma

Having included Mocha and Chai on this list, it would be incomplete not to include a test runner to run these tests or perhaps to set up continuous integration testing. Karma is a tool designed to help automate running your tests against different browsers. It will help you run your Mocha and Chai tests on all the browsers out there.

Not every browser runs on every platform but luckily there are a couple of free tools you can use to test other browsers, take a look at Browser Screenshots. If you are running on OS X and want to test Edge or Internet Explorer, you can use this tool for free.

When to use Karma? Whenever you have a comprehensive test suite for your applications and want to ensure the tests pass on all the browsers.

GitHub: https://github.com/karma-runner/karma

Current Version: v0.13

Website: karma-runner.github.io

PhantomJS

Running full browsers to test your code is memory and CPU intensive. PhantomJS allows you to run a headless WebKit - the rendering engine behind Safari and previously Chrome (now Blink). It enables you to run your tests, capture screenshots, monitor the network and automate page browsing from a JavaScript API.

When to PhantomJS? When you need to do more testing, manipulate pages and monitor network requests.

GitHub: https://github.com/ariya/phantomjs

Current Version: v2.0

Website: phantomjs.org

Grunt & Gulp

Building websites for production typically involve some tasks to improve performance like minification of JavaScript and CSS, compilation of CoffeeScript/TypeScript, unit testing, lintin. Perhaps you already have a toolchain ready to prepare your website for production but if you do not, you want to use a task runner like Grunt or Gulp. Both have endless plugins to do just about any transformation to your website to get it ready for production.

When to use Grunt? When you prefer writing configuration files and don’t mind your task runner generating intermediary files.

Grunt GitHub: https://github.com/gruntjs/grunt

Grunt Current Version: v0.4.5

Grunt Website: gruntjs.com

When to use Gulp? When you prefer to write code over configuration and want to take advantage of node.js’ streaming capabilities for faster task execution.

Gulp GitHub: https://github.com/gulpjs/gulp

Gulp Current Version: v3.9.0

Gulp Website: gulpjs.com

Babel

JavaScript as a language is evolving quickly. ECMAScript 2015 was released last summer and many of its new features are implemented in the latest browsers. If you want to take a look at ECMAScript 2015 compatibility, you can take a look at this table from @kangax. You’ll notice that the latest versions of Edge, Firefox and Chrome have near-complete compatibility.

We do not live in a perfect world. As developers, we will need to continue supporting older browsers that do not have the latest and greatest JavaScript features. We do want to advance the web and improve our code bases. Babel is a JavaScript compiler that compiles the latest JavaScript standard to ES5-compliant JavaScript allowing you to run on browsers as old as IE9. It has some plugins that make it easier to develop with React and even use features that are not part of the specification (e.g. ES7).

When to use Babel? When you want to use new JavaScript language features and still support older browsers.

GitHub: https://github.com/babel/babel

Current Version: 6.1.2

Website: babeljs.io

More hands-on with Web Development

This article is part of the web development series from Microsoft tech evangelists and engineers on practical JavaScript learning, open source projects, and interoperability best practices including Microsoft Edge browser and the new EdgeHTML rendering engine.

We encourage you to test across browsers and devices including Microsoft Edge – the default browser for Windows 10 – with free tools on dev.microsoftedge.com:

More in-depth learning from our engineers and evangelists:

Our community open source projects:

More free tools and back-end web dev stuff:

Top JavaScript Frameworks, Libraries & Tools and When to Use Them的更多相关文章

  1. Awesome Go精选的Go框架,库和软件的精选清单.A curated list of awesome Go frameworks, libraries and software

    Awesome Go      financial support to Awesome Go A curated list of awesome Go frameworks, libraries a ...

  2. Select the JavaScript graphing libraries you would like to compare

    Select the JavaScript graphing libraries you would like to compare:             Overview Summary Fus ...

  3. github & Front-end JavaScript frameworks

    github & Front-end JavaScript frameworks https://github.com/collections/front-end-javascript-fra ...

  4. 11 JavaScript Utility Libraries you Should Know in 2019

    11 Useful Javascript utility libraries to speed your development.

  5. 10 Best Responsive HTML5 Frameworks and Tools

    http://designinstruct.com/roundups/html5-frameworks/

  6. Vue.js Is Good, but Is It Better Than Angular or React?

    Vue.js is a JavaScript library for building web interfaces. Combining  with some other tools It also ...

  7. AndroidArchitecture

    title: AndroidArchitecture date: 2016-04-08 23:26:20 tags: [architecture] categories: [Mobile,Androi ...

  8. 嗝,我饱了——IDEA食用指南

    1 概述 IDEA全称IntelliJ IDEA,主要用于Java开发的IDE,代码自动提示,重构,JUnit,代码分析等的功能非常牛逼,这篇文章首先介绍目前为止IDEA最新版本的特性,然后从UI,常 ...

  9. 40 JavaScript Chart and Graph Libraries for Developers--reference

    reference:http://www.egrappler.com/javascript-chart-and-graph-libraries-for-developers/ BY TEAMEGRAP ...

随机推荐

  1. <xliff:g>标签

    摘要: 这是Android4.3Mms源码中的strings.xml的一段代码: <!--Settings item desciption for integer auto-delete sms ...

  2. mantis增加密码修改

    解决方式就是考虑修改Mantisbt PHP程序,增加一个密码修改框,这样管理员就可以直接修改用户密码了.     操作步骤如下:    1) 修改文件 manage_user_edit_page.p ...

  3. simple grammer

    <?phpecho strlen("Hello world!"); // outputs 12?> <?phpecho str_word_count(" ...

  4. 第二个sprint第一天

    一.例会人员:李泳江,邵家文,周伟雄,谢洪跃 日期:6月1号   例会内容: 1.用户调研,修复bug,要对初期的版本的bug进行解决,以便能够在6月3号演示. 2.整个第二个sprint 我们队伍要 ...

  5. iOS平台XML解析类库对比和安装说明

    在iPhone开发中,XML的解析有很多选择,iOS SDK提供了NSXMLParser和libxml2两个类库,另外还有很多第三方类库可选,例如TBXML.TouchXML.KissXML.Tiny ...

  6. Sqlserver 远程连接的 TCP/IP 和 Named Pipes的区别

    TCP/IP:  TCP/IP是 Internet 上广泛使用的通用协议.它与互连网络中硬件结构和操作系统各异的计算机进行通信.TCP/IP包括路由网络流量的标准,并能够提供高级安全功能.它是目前在商 ...

  7. FHS目录配置下,常见的几个问题及解答

    请说明/bin与/usr/bin目录所放置的执行文件有何不同之处? /bin主要放置在开机时,以及进入单人维护模式后还能够被使用的指令,至于/usr/bin则是大部分软件提供的指令放置处. 请说明/b ...

  8. yii点击上传图片后立即显示

    结合yii上传做的图片上传后立即显示,自己琢磨的,有点low <script type="text/javascript">//下面用于图片上传预览功能function ...

  9. Java基础类型与其二进制表示

    Java中的基础类型有:byte.short.int.long.float.double.char和boolean. 它们可被分为四种类型,整型.浮点型.char型和boolean型. 整型:byte ...

  10. Spring AOP 实现写事件日志功能

    什么是AOP?AOP使用场景?AOP相关概念?Spring AOP组件?如何使用Spring AOP?等等这些问题请参考博文:Spring AOP 实现原理 下面重点介绍如何写事件日志功能,把日志保存 ...