JavaScript 框架和 CSS 框架:JQuery、YUI、两者都不是,还是其他框架?

发布于 2024-07-19 15:09:57 字数 1432 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

羁绊已千年 2024-07-26 15:09:58

我个人推荐jQuery。 它正在广泛开发、快速、强大且小巧(例如与较大的 YUI 相比)。 它有 jQueryUI 库,带有可定制的界面元素主题和许多插件。

I personally recommend jQuery. It is extensively developing, fast, powerful and small (comparing to YUI for example which is big). It has jQueryUI library with customizable themes for interface elements and many plugins.

泡沫很甜 2024-07-26 15:09:58

为什么不同时使用两者?我有几个项目。

jQuery 的尺寸很小。 您可以使用 google 的开放 ajax 库中的缩小版本,并且由于许多人已经这样做了,因此可能根本不需要下载,因为它很可能已经在您的用户的缓存中。

至于 YUI,他们有一个很棒的配置器,可以满足您的需求。 此外,他们的文档非常详尽,他们的小部件在兼容性方面也是一流的。

在使用过两者之后,jQuery 的优势在于它的速度和灵活性,可以完成许多任务。 YUI 的优势在于它是一流的、随时可用的小部件。 这两个项目都编写了非常可靠的代码,不会互相干扰。 这两个项目都努力兼容所有 A 级浏览器,并且小心翼翼地不破坏名称空间——这比我对其他一些框架所说的要好。

Why not use both? I have on a couple projects.

jQuery's size is small. You can use the minified version from google's open ajax libraries, and since many people already do this, there may be no download at all b/c it may very well already be in your user's cache.

As for YUI, they have a great configurator for getting exactly what you need. Also their documentation is very thorough and their widgets top notch in compatibility.

Having worked with both, jQuery's strength is it's speed and flexibility to do a lot of tasks. YUI's strength is it's top-notch, ready to use widgets. Both projects have written very solid code that will not interfere with each other. Both projects have worked hard to be compatible across all A grade browsers and careful not to trash the name space - which is better than I can say for some other frameworks.

萧瑟寒风 2024-07-26 15:09:58

我使用过 JQuery,但是您确实应该考虑尝试 YUI 和 JQuery,看看它们如何工作以及它们是否适合您的需求。

YUI:http://developer.yahoo.com/yui/

JQuery:http://jquery.com/

我个人认为 JQuery 文档非常棒。 我还没有真正尝试过YUI。

据我所知,JQuery 是这两个框架中更受欢迎的一个,我在上一份工作中使用了 JQuery,并且看到了该框架的大量使用。有许多为 JQuery 开发的插件,并且可以在网络上找到示例。 不过,我再说一遍,我从来没有真正玩过 YUI。

以下是 MooTools、JQuery、Prototype、YUI 和 Dojo 在不同浏览器上的基准测试。

基准

I have used JQuery, however you really should look into trying both YUI and JQuery to see how they work and whether or not they suit your needs.

YUI: http://developer.yahoo.com/yui/

JQuery: http://jquery.com/

I personally find the JQuery documentation to be excellent. I have not really given YUI a shot.

JQuery is the more popular of the two frameworks from what I can tell, I used JQuery at my last job and have seen heavy use of the framework.There are many plugins that have been developed for JQuery and examples can be found all over the web. Again though, I've never really played around with YUI.

Here are benchmarks of MooTools, JQuery, Prototype, YUI, and Dojo on different browsers.

Benchmarks

余生一个溪 2024-07-26 15:09:58

您应该问自己的第一个问题是:我需要从这个框架中得到什么? 例如,JQuery 和 YUI 采用两种完全不同的方法。 JQuery 本身几乎是一个简单的查询库,它使用 XPath 选择器来导航 DOM 树并将转换应用于其节点。 话虽这么说,它还有大量的库(例如 JQuery UI,以及成百上千个第三方库),其中包含 UI 小部件、漂亮的动画以及其他您从来不知道可以轻松完成的酷炫事情JavaScript。 它是一个函数库,并不真正处理对象。

另一方面,YUI 则走相反的方向。 它主要是一个 UI 库,这意味着它的存在是为了向您提供功能性 UI 小部件(按钮、树、面板、对话框等)。 它还具有附加功能和支持/实用对象,可用于执行与 JQuery 相同类型的 XPath DOM 树查询,但这是次要的。 它也是非常面向对象的。

发布的链接 cletus 也是一个很好的起点。

First question you should ask yourself is: what do I need from this framework? JQuery and YUI, for example, take two totally different approaches. JQuery itself is pretty much a simple querying library that uses XPath selectors to navigate the DOM tree and apply transformations to its nodes. That being said, it also has tons of libraries (such as JQuery UI, as well as hundreds if not thousands of third party ones) that contain UI widgets, nifty animations, and other ridiculously cool things you never knew you could do so easily with Javascript. It's a functional library and doesn't really deal with objects.

YUI, on the other hand, goes the opposite direction. Primarily it's a UI library, meaning it exists to provide you with functional UI widgets (buttons, trees, panels, dialogs, etc). It also has additions and support/utility objects that can be used to do the same sort of XPath DOM tree querying as JQuery, but that's secondary. It's also pretty object-oriented.

The link cletus posted is also a great place to start.

静若繁花 2024-07-26 15:09:57

首先,可能值得仔细阅读 哪个 Javascript 框架(jQuery vs Dojo vs ...)?< /a>.

其次,Javascript 框架有两大类:

  1. Rich: 用于创建所谓的丰富互联网应用程序,它们通常旨在创建类似于具有复杂窗口 GUI 的桌面应用程序的体验。 这包括但不限于 YUI、Dojo、ExtJS 和 SmartClient;

  2. 补充:这些更侧重于改善传统网站体验,而不是完全取代它。 其中包括 jQuery、Prototype 等。 有些人可能会指出 jQuery 有 jQuery UI,但这充其量只是一个准系统小部件库,在开箱即用的用户界面功能方面与 YUI 完全无法相比。

因此,您应该问自己的第一件事是:您要创建什么样的应用程序?

我个人认为使用 YUI 或 jQuery 不会出错,具体取决于你的答案。

Firstly, it's probably worth perusing Which Javascript framework (jQuery vs Dojo vs … )?.

Secondly, there are two broad categories of Javascript framework:

  1. Rich: made for creating so-called Rich Intenet Applications, they are typically aimed at creating experiences much like a desktop applications with sophisticated windowing GUIs. This includes, but aren't limited to, YUI, Dojo, ExtJS and SmartClient;

  2. Complementary: these are more focused on improving a traditional Website experience rather than replacing it altogether. These include jQuery, Prototype and others. Some might point out that jQuery has jQuery UI but this is a barebones widget library at best and completely incomparable to, say, YUI in terms of out-of-the-box user interface capabilities.

So the first thing you should ask yourself is: what kind of application are you creating?

Personally I think you can't go wrong with YUI or jQuery, depending on your answer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文