From 1bc2b64e8a3619fd85dcde2b2fc799ed58b3410e Mon Sep 17 00:00:00 2001 From: chenxinlong <237448382@qq.com> Date: Thu, 9 Mar 2017 12:19:59 +0800 Subject: [PATCH] translated by chenxinlong --- ... 15 JavaScript frameworks and libraries.md | 97 +++++++++---------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/sources/tech/20161128 15 JavaScript frameworks and libraries.md b/sources/tech/20161128 15 JavaScript frameworks and libraries.md index aaba6794b4..a24d158754 100644 --- a/sources/tech/20161128 15 JavaScript frameworks and libraries.md +++ b/sources/tech/20161128 15 JavaScript frameworks and libraries.md @@ -1,111 +1,108 @@ (翻译中 by chenxinlong) -15 JavaScript frameworks and libraries +15 JavaScript 的框架和库 ============================================================ ![15 JavaScript frameworks and libraries](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/code_javascript.jpg?itok=a4uULCF0 "15 JavaScript frameworks and libraries") ->Image credits : Photo by Jen Wike Huger +>来源 : 图片来自 Jen Wike Huger -JavaScript is the future. +JavaScript 即未来趋势所在。 -The language is supported by a number of technololgy leaders, one of whom is WordPress's founder Matt Mullenweg, who hinted that [WordPress developers][18]should learn it, clearly sending a message to the WordPress community as to it future importance. The mention was well received. The transition to better technology will enable WordPress to keep up with future challenges. +Javascript 拥有众多的技术领导者的拥护和支持,其中一位就是 WordPress 的作者 Matt Mullenweg , 他表示 [WordPress 开发者][18] 应该学习 JavaScript , 这也清晰地向 WordPress 社区传达了 JavaScript 在未来的重要性。 同时,这一观点也被普遍接受。向着更先进的技术靠拢与过渡也同时保证了 WordPress 在未来的挑战中不会落于人后。 -JavaScript’s open source stance is also one of the best. Contrary to popular belief, JavaScript is not a project, but a specification with an open standard where the language is evolved and maintained by its core team. [ECMAScript][19], another fancy name of JavaScript, is not open source, but it too has an open standard. +JavaScript 同时也是众多站在开源立场的技术中的佼佼者。与现在所流行的观点相反,JavaScript 不是一个工程,而是一个由其核心团队共同制定和维护的开放标准。[ECMAScript][19] , 另一个和 JavaScript 相关的名字, 它虽然不是开源的,但它也有一个开放的标准。 -You can easily see evidence of JavaScript's popularity when you look at both at GitHub. JavaScript is the top programming language when it comes to the[number of repositories][20]. Its prominance is also evident on Livecoding.tv, where members are diligently creating more videos on JavaScript than any other topic. At the time of this writing, the self-dubbed edutainment site hosts [45,919 JavaScript videos][21]. +当你在浏览 GitHub 的时候你就可以发现 JavaScript 在当今有多么流行了。而且就 [repository 的数量][20] 而言,JavaScript 绝对位于所有的编程语言当中最顶尖的那一层次。 同时,在 Livecoding.tv 上你也能看出 JavaScript 有多么突出,这里的用户发布的关于 JavaScript 的视频的数量比其他的话题多得多。在写这篇文章的时候(原作者写下这篇文章的日期,非译者翻译日期),Livecoding.tv 上已经有 [45,919 个 用户原创的 JavaScript 视频教程][21] 。 -### Top open source JavaScript frameworks and libraries +### 热门的开源 JavaScript 框架和库 -Getting back to the topic, JavaScript is blessed with a large community that thrives on improving the technology. Hundreds of JavaScript frameworks and libraries are available to developers, and the good news is that the best ones are open source. For a JavaScript developer, using the best framework or libraries for rapid development is now a necessity. The current market demands rapid development. Also, reinventing the wheel is not a good idea in the current market. Regardless of whether you are new to JavaScript or an experienced JavaScript developer, using libraries and frameworks improves your work significantly. +回归到主题, 庞大的社区是 JavaScript 的一个得天独厚的优势,同时这也驱动了 JavaScript 的蓬勃发展。这里有数以百千计的成熟的 JavaScript 框架和库供开发者使用,同时这些最优秀的框架和库都是开源的。对当前的 JavaScript 开发者来说,能够使用这些优秀的框架和库来进行快速开发已经是必须技能了。当今的市场需要快速开发,但是,重复造轮子是没有必要的。不论你是一个 JavaScript 新手还是一个资深的 JavaScript 开发者,使用框架和库都能极大提高你的工作效率。 -Let’s get started. +好了,让我们开始吧! ### 1\. Angular.js -[Angular.js][1] is one of the most popular JavaScript frameworks. It is used by developers to create complex web apps. The idea behind Angular.js is its one-page app model. It also supports MVC architecture. With Angular.js, the developer can use JavaScript code in the front end, literally extending the HTML vocabulary. +[Angular.js][1] 是目前最热门的 JavaScript 框架之一。它用于开发者构建复杂的 web 应用。Angular.js 背后的思想是它的单页应用 model。同时它 也支持 MVC 架构。在 Angular.js 中 ,开发者可以在前端中使用 JavaScript 代码,并从字面上扩展 HTML词汇。 -Angular.js has improved a great deal since its inception in 2009\. The current stable version of Angular 1 is 1.5.8/1.2.30\. You can also try out Angular 2, a significant improvement over Angular 1, but this framework is still not yet adopted by developers across the world. +Angular.js 自 2009 年出现以来已经有了很大的改进。Angular 1 当前的稳定版本是 1.5.8/1.2.30 。你也可以试一试 Angular 2 ,相对于 Angular 1 来说它有了重大的改进,但这个新版本仍未在全球范围内被普遍使用。 -Angular.js uses data binding as one of the main concepts to get work done. The user interacts with the interface. When the interaction is done, the view is then updated with the new values, which in turn interact with the model and ensure everything is synchronized. The DOM gets updated after the underlying logic is executed in the model. +在 Angular.js 中,数据绑定是完成作业的一个重要概念。在用户与接口的交互中,当交互完成 view 就会自动更新新值,随即新值与 model 交互以确保一切都是同步的。在底层的逻辑在 model 中执行完成后,DOM 也会随即更新。 ### 2\. Backbone.js -Not everyone intends to build a complex web application. Simpler web application frameworks such as [Backbone.js][2] are a great fit for those learning web app development. Backbone.js is a straightforward framework that makes building simple web apps fun and speedy. Just like Angular.js, Backbone.js also comes with MVC support. Other key features of Backbone.js are routing, RESTful API’s support, proper state management, and much more. You can also use Backbone.js to build single page apps. +复杂 web 应用并不适用于所有场景。一些较简单的 web 应用框架例如 [Backbone.js][2] 就非常适合学习 web app 开发。Backbone.js 是一个简单的框架,可以快速方便地构建简单的 web 应用。和 Angular.js 一样,Backbone.js 也支持 MVC 。Backbone.js 还有一些其它关键特性如路由,RESTful API 支持,适当的状态管理等等。你甚至还可以用 Backbone.js 来构建单页应用。 -The current stable version is 1.3.3 and is available from [GitHub][22]. +当前的稳定版本是 1.3.3,可以在 [GitHub][22] 中找到。 ### 3\. D3.js -[D3.js][3] is an excellent JavaScript library that enables developers to create rich web pages with data manipulation features. D3.js uses SVG, HTML, and CSS to make the magic happen. With D3.js, you can bind data to DOM easily and enable data-driven events. With D3.js, you also can create high-quality data-driven web pages that offer a better understanding of data coupled with great visuals. Check[Hamiltonian Graphs from LCF notation][23], powered by D3.js. +[D3.js][3] 是一个优秀的 JavaScript 库,它允许开发者创建具有数据处理功能的富 web 页面。D3.js 使用 SVG, HTML 和 CSS 来实现这一切功能。使用 D3.js ,你可以更轻松地将数据绑定到 DOM 及启用数据驱动事件。使用 D3.js ,你还可以创建高质量的数据驱动的 web 页面来提供一个更易于理解的视觉效果来呈现数据。查看示例 : [LCF 符号哈密顿图][23] ,由 D3.js 强力驱动。 ### 4\. React.js -[React.js][4] is an interesting JavaScript framework to work with. Unlike other JavaScript frameworks, React.js is ideal for building highly scalable front-end user interfaces. React.js came into existence in 2013 under a BSD license and is growing rapidly thanks to the advantages that it brings to developing complex yet beautiful user interfaces. +[React.js][4] 是一个使用起来很有趣的 JavaScript 框架。和其它的 JavaScript 框架不同,React.js 志在构建一个高可扩展的前端用户界面。React.js 出现于 2013 年,它采用了 BSD 开源协议。它以其能够开发复杂且漂亮的用户界面所带来的优势而迅速发展壮大。 -The core idea behind React.js is the virtual DOM. Virtual DOM acts as a mediator between the client-side and the server-side, bringing improved performance. The changes made in the virtual DOM are matched with the server DOM, and only the needed elements are updated, making the process much faster than a traditional UI update. +React.js 背后的核心思想是虚拟 DOM 。虚拟 DOM 在客户端和服务端之间扮演着一个中间人的角色并带来了显著的性能提升。虚拟 DOM 的改变和 server DOM 一样,只需要更新所需的元素,相对于传统的 UI 渲染来说极大提升了渲染速度。 -You can also use material design with React, enabling you to develop modern web apps with unparalleled performance. +你还可以使用 Recat 来实现 meterial 风格的设计,使你能够开发具有无与伦比的性能的 web 应用。 -Check out mittax from Munich, Germany working on React Material-UI in the video below. +### 5\. jQuery -### 6\. jQuery +[jQuery][5] 是一个非常流行的 JavaScript 库,它拥有众多特性例如事件处理,动画等。当你在做一个 web 项目的时候,你不会想要把时间浪费在为一些简单的功能写代码上。jQuery 为减少你的工作量提供了一些易于使用的 API 。这些 API 在所有的常见的浏览器中都能够使用。使用 jQuery, 你可以无缝地控制 DOM 以及 Ajax 这样在近几年来拥有高需求的作业。使用 jQuery, 开发者不必担心一些低级的交互,同时可以使他们的 web 应用的开发更加容易与迅速。 -[jQuery][5] is a very popular JavaScript library with features such as event handling, animation, and much more. When working on a web project, you don’t want to waste time writing code for simple tasks. jQuery frees you from this with its easy-to-use API. It also works with all the popular web browsers. With jQuery, you can seamlessly control the DOM and also develop an Ajax application, which is in high demand for the last few years. With jQuery, developers don’t have to worry about low-level interactions and can easily develop their web applications faster and easier. +jQuery 同时便于分离 HTML 和 JavaScript 代码,使开发者能够编写简洁同时跨浏览器兼容的代码。并且使用 jQuery 创建的 web 应用在将来也易于改善和扩展。 -jQuery also facilitates the separation of HTML and JavaScript code, enabling developers to write clean code with cross-browser compatibility. Moreover, web apps created using jQuery are easily improved and extended in the future. +### 6\. Ember.js -### 7\. Ember.js +[Ember.js][6] 是一个 Angular.js 和 React.js 的功能的混合体。当你在浏览社区的时候你能明显地感受到 Ember.js 的热门程度。Ember.js 的新特性也不断地在添加。它在数据同步方面与 Angular.js 很像。 双向的数据交换可以确保应用的快速性和可扩展性。同时,它还能够帮助开发者创建一些前端元素。 -[Ember.js][6] is a mix of Angular.js and React.js when it comes to functionality. You can easily see the popularity of Ember.js when observing the support community. New features are added constantly. It works similar to Angular.js when it comes to syncing data. The two-way data exchange ensures that the app is fast and scalable. It also helps developers to create front-end elements. +和 React.js 的相似之处在于,Ember.js 提供了同样的服务端虚拟 DOM 以确保高性能和高可扩展。同时, Ember.js 提倡简化代码,提供了丰富的 API。Ember.js 还有非常优秀的社区。 -When it comes to React.js for similarities, Ember.js provides similar server-side Virtual DOM for better performance and scalability. Ember.js also encourages minimal code writing, offers excellent APIs to work with, and has an excellent community. +### 7\. Polymer.js -### 8\. Polymer.js +如果你曾想过创建你自己的 HTML5 元素,那么你可以使用[Polymer.js][7] 来做这些事。 Polymer 主要集中于通过给 web 开发者提供创建自己的标签的功能来提供扩展功能。例如,你可以创建一个和 HTML5 中的 \