哪个Javascript框架最简单,最强大? [英] Which Javascript Framework is the simplest and most powerful?

查看:97
本文介绍了哪个Javascript框架最简单,最强大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用各种javascript框架,包括mootools,jquery,prototype和scriptaculous,并且发现它们都很好,但很难扩展到更复杂的想法。

I've been using various javascript frameworks including mootools, jquery, prototype and scriptaculous and have found them all good, but difficult to extend to more complex ideas.

如果我要指责并学习一个,这是最简单的扩展和使用,同时保持足够强大,可以在各个方向使用?

If I am going to knuckle down and learn one, which is the simplest to extend and use whilst staying powerful enough to use in a variety of directions?

推荐答案

我建议使用jQuery。

I propose jQuery.

我会告诉你我的团队昨天为高级管理层说服他们说服他们的演讲中的一些主要论点其中。

I'll give you some of the major arguments from the presentation that my team put on yesterday for senior management to convince them of that.

理由:


  1. 社区接受。请查看此图。它显示了从2004年到2008年搜索原型,yui和scriptaculous的搜索。然后在2006年的搜索中,jquery的搜索量增加了一倍,其他库的数量增加了一倍。社区实际上正在融合到一个领先的产品上,而且它是jQuery。

  1. Community acceptance. Look at this graph. It shows searches for "prototype", "yui" and "scriptaculous" growing from 2004 to 2008. Then out of nowhere in 2006 searches fro "jquery" shoot up to double the number of the other libraries. The community is actually converging on a single leading product, and it's jQuery.

jQuery非常简洁易读。我进行了一个实验,其中我使用YUI编写的现有代码(随机选择),并尝试在jQuery中重写它。它在jQuery中只有1/4。这使得它的编写容易4倍,维护容易4倍。

jQuery is very very succinct and readable. I conducted an experiment in which I took existing code (selected at random) written in YUI, and tried re-writing it in jQuery. It was 1/4 as long in jQuery. That makes it 4 times as easy to write, and 4 times as easy to maintain.

jQuery与其他网络世界完美融合。使用CSS语法作为选择项目的关键是一个很好的技巧,它有助于将高度不同的HTML,CSS和JavaScript世界融合在一起。

jQuery integrates well with the rest of the web world. The use of CSS syntax as the key for selecting items is a brilliant trick which helps to meld together the highly diseparate worlds of HTML, CSS and JavaScript.

文档:jQuery具有出色的文档,具有清晰的规范和每种方法的工作示例。它有很好的书籍(我推荐jQuery in Action。)唯一匹配它的竞争对手是YUI。

Documentation: jQuery has excellent documentation, with clear specifications and working examples of every method. It has excellent books (I recommend "jQuery in Action".) The only competitor which matches it is YUI.

活跃的用户社区:谷歌组是Prototype的主要社区讨论论坛有近1000名成员。 jQuery的Google小组成员数量是其10倍。而我个人的经验是社区往往会有所帮助。

Active user community: the Google group which is the main community discussion forum for Prototype has nearly 1000 members. The Google group for jQuery has 10 times as many members. And my personal experience is that the community tends to be helpful.

简单的学习曲线。 jQuery很容易学习,即使对于有设计经验但没有编码经验的人也是如此。

Easy learning curve. jQuery is easy to learn, even for people with experience as a designer, but no experience in coding.

性能。查看由mootools发布的这个。它比较了不同框架的速度。 jQuery并不总是非常快,但它在每次测试中都相当不错。

Performance. Check out this, which is published by mootools. It compares the speed of different frameworks. jQuery is not always the VERY fastest, but it is quite good on every test.

与其他人一起玩得很好:jQuery的noConflict模式和核心库的小尺寸帮助它可以在已经使用其他库的环境中正常工作。

Plays well with others: jQuery's noConflict mode and the core library's small size help it to work well in environments that are already using other libraries.

旨在使JavaScript可用。循环是JavaScript的痛苦; jQuery适用于几乎不需要编写循环的set对象。 JavaScript的最大优势在于函数是一流的对象; jQuery广泛使用了这个功能。

Designed to make JavaScript usable. Looping is a pain in JavaScript; jQuery works with set objects you almost never need to write the loop. JavaScript's greatest strength is that functions are first-class objects; jQuery makes extensive use of this feature.

插件。 jQuery旨在使 easy 编写插件。还有一大群人在那里写插件。你想要的任何东西都可能在那里。查看这个用于视觉示例。

Plug-ins. jQuery is designed to make it easy to write plugins. And there is an enormous community of people out there writing plugins. Anything you want is probably out there. Check out things like this or this for visual examples.

我希望你觉得这很有说服力!

I hope you find this convincing!

这篇关于哪个Javascript框架最简单,最强大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆