任何人都知道一个好的 JavaScript UI (Widget) 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6974786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Anybody knows a good JavaScript UI (Widget) Library
提问by Preli
Recently I had to develop several web applications. I did extensive research regarding JavaScript UI Libraries but I haven't been able to find one I was really satisfied with. What I mean with UI libraries is a library which provides user-controls such as buttons, combo boxes, grids, charts, layout, ...
最近我不得不开发几个 Web 应用程序。我对 JavaScript UI 库进行了大量研究,但一直没有找到让我真正满意的库。我所说的 UI 库是一个提供用户控件的库,例如按钮、组合框、网格、图表、布局……
What I found so far and why I didn't like it a 100%
到目前为止我发现了什么以及为什么我不喜欢它 100%
- jQuery UIhas too few controls. (I know there are a lot of plugins and you can nearly find everything but it is not the same as a complete library made and tested by one team or group)
- Dijit (Dojo). I really like this one but when I try to use it in my websites I'm always having troubles. They don't seem to be as easy to use as other libs.
- YUIversion 2 had a lot of controls, but the "new" version 3 still misses many controls. (or I am just too dumb to find them) I don't want to work with both versions at the same time or use an old version which will be replaced soon.
- DHTMLXhas many controls and they work really well, but the controls themselves lack many features. (for example the HTMLEditor does not even support to change the text color out of the box or I could not find an easy way to expand/collapse tree nodes with some sort of animation)
- jQuery UI 的控件太少。(我知道有很多插件,您几乎可以找到所有插件,但这与由一个团队或小组制作和测试的完整库不同)
- 迪吉特(道场)。我真的很喜欢这个,但是当我尝试在我的网站中使用它时,我总是遇到麻烦。它们似乎不像其他库那样容易使用。
- YUI版本 2 有很多控件,但“新”版本 3 仍然缺少许多控件。(或者我太笨了,找不到它们)我不想同时使用两个版本或使用即将被替换的旧版本。
- DHTMLX有许多控件并且它们工作得很好,但是控件本身缺乏许多功能。(例如,HTMLEditor 甚至不支持立即更改文本颜色,或者我找不到使用某种动画展开/折叠树节点的简单方法)
If anybody knows of a good library which I have not tried yet or knows how I could use one of the above libraries "better" I would be really happy. I am wondering why at this point (where web-apps are getting so important) I still can't find a complete UI framework which would provide me with controls which you can find in other environments since years (or even decades) - for example Java, .net or Delphi to name just a few.
如果有人知道我还没有尝试过的好库,或者知道如何“更好地”使用上述库之一,我会非常高兴。我想知道为什么在这一点上(网络应用程序变得如此重要)我仍然找不到一个完整的 UI 框架,它可以为我提供几年(甚至几十年)以来你可以在其他环境中找到的控件 - 例如Java、.net 或 Delphi 仅举几例。
edit:
编辑:
I know there won't be a library with every control I ever need, but what I expect from such a library is at least: consistent skins, api, documentation, validation and the most important controls you'd need in business apps/websites (datepicker, button, editor with support for numerical data, grid/tree, layout controls, HTML editor) AND the possibility to create your own controls. good to have: charts or reporting
我知道不会有一个包含我需要的所有控件的库,但我对这样的库的期望至少是:一致的皮肤、api、文档、验证以及您在业务应用程序/网站中需要的最重要的控件(日期选择器、按钮、支持数字数据的编辑器、网格/树、布局控件、HTML 编辑器)以及创建自己的控件的可能性。值得拥有:图表或报告
采纳答案by Josh Johnson
Ext JSprovides the best GUI widgets by far. I've used it for a large intranet project, and have been completely satisfied. It's available under GPLv3 and a commercial license.
Ext JS提供了迄今为止最好的 GUI 小部件。我已经将它用于一个大型的内网项目,并且已经完全满意。它在 GPLv3 和商业许可下可用。
Be extremely careful when evaluating open-source frameworks. They tend to religiously promote the quality of their projects, but I've found that poor documentation and buggy code are pervasive. Dojo claims heavy industry involvement, but their documentation is poor, and it's not hard to find bugs on their website (the dijit example pages have been broken for months at a time...).
评估开源框架时要格外小心。他们倾向于虔诚地提升他们项目的质量,但我发现糟糕的文档和错误的代码很普遍。Dojo 声称有大量的行业参与,但他们的文档很差,而且在他们的网站上不难找到错误(dijit 示例页面一次被破坏了几个月......)。
回答by Spudley
Your comment about JQueryUI is very telling.
您对 JQueryUI 的评论很有说服力。
As you say, JQueryUI does provide relatively few controls, but has a lot of plugins available. But you're looking for a single library with everything you want built-in.
正如你所说,JQueryUI 确实提供了相对较少的控件,但有很多可用的插件。但是您正在寻找一个包含您想要的所有内容的单一库。
This is a tough ask, because we don't actually know what widgets you really want, which ones you like the sound of but probably wouldn't use, or which ones you'd use but only if they worked exactly the way you want.
这是一个棘手的问题,因为我们实际上并不知道您真正想要哪些小部件,您喜欢哪些小部件但可能不会使用,或者您会使用哪些小部件但前提是它们完全按照您想要的方式工作.
It's virtually impossible to predict all the widgets that someone may want, or how they want them to work. And even if a given library does get it exactly right, when your needs change slightly in the wrong direction, suddenly the library you chose could turn out to be a poor choice rather than the right one.
几乎不可能预测某人可能想要的所有小部件,或者他们希望它们如何工作。即使给定的库确实完全正确,当您的需求在错误的方向上发生轻微变化时,您选择的库可能会突然变成一个糟糕的选择,而不是正确的选择。
This is why flexibility and maintainability are far more important than getting an exact feature match. Once you go beyond the basic set of widgets, most others are built on top of the simple ones anyway, but everyone has their own ideas about how they should be implemented, and new UI concepts are being thought up every day. This is why the plug-in model works so well, and why I feel you're making a mistake in discounting JQueryUI because most of the widgets are available as plug-in. In fact, I would say that this model is likely to be the best solution for you.
这就是为什么灵活性和可维护性远比获得精确的功能匹配重要的原因。一旦你超越了基本的小部件集,大多数其他小部件无论如何都是建立在简单的小部件之上的,但是每个人对如何实现它们都有自己的想法,并且每天都在考虑新的 UI 概念。这就是插件模型运行良好的原因,也是为什么我觉得您在打折 JQueryUI 时犯了一个错误,因为大多数小部件都可以作为插件使用。事实上,我会说这个模型很可能是最适合你的解决方案。
There are a number of other libraries available which you haven't mentioned. Mootools and Prototype are probably the best well known, but there are others too. Rather than list them all, I'll point you to this page on Wikipedia, which lists them all in a comparative table: http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
还有许多其他可用的库,但您没有提到。Mootools 和 Prototype 可能是最著名的,但也有其他的。我不会将它们全部列出,而是将您指向 Wikipedia 上的此页面,该页面将它们全部列在比较表中:http: //en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks
I hope you find that helpful. But I suspect you won't find any library in that list that comes with every widget you'd ever want, all in one bundle. They all rely on plug-ins, because the library developers are generally focusing on making a framework for widgets, rather the widgets themselves.
我希望你觉得这很有帮助。但是我怀疑您不会在该列表中找到任何包含您想要的所有小部件的库,所有这些都包含在一个包中。它们都依赖于插件,因为库开发人员通常专注于为小部件制作框架,而不是小部件本身。
回答by Cagatay Civici
Check out PrimeUI, provides various widgets and built with jQuery UI APIs. Licensed under Apache V2. http://www.primefaces.org/primeui/
查看 PrimeUI,提供各种小部件并使用 jQuery UI API 构建。在 Apache V2 下获得许可。http://www.primefaces.org/primeui/
回答by Krishna Vedula
Recently Telerik Kendo UI which is built on top of jQuery (no impedence mismatch with other frameworks) has Open sourced (Apache 2.0 License) their Library of Widgets.
最近,建立在 jQuery 之上的 Telerik Kendo UI(与其他框架没有阻抗不匹配)已经开源(Apache 2.0 许可)他们的小部件库。
I strongly recommend this..
我强烈推荐这个..
Telerik Kendo UI is not Open Source
回答by bstick12
If you don't mind the licencing you should have a look at http://www.sencha.com/the ExtJS library.
如果您不介意许可,您应该查看http://www.sencha.com/ExtJS 库。
A demo library available at http://www.sencha.com/products/extjs/examples/