JQuery 与 ExtJS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4772476/
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
JQuery vs ExtJS
提问by Pappu
We are planning the development of completely new GUI. We were very happy with JQuerywhich we used in our old product. It was easy, classy and fast.
我们正在计划开发全新的 GUI。我们对我们在旧产品中使用的JQuery感到非常满意。这很容易,优雅和快速。
We have heard about ExtJS. It also has AJAX and a large list of other features.
我们听说过ExtJS。它还具有 AJAX 和大量其他功能。
We want to use only one of them.
我们只想使用其中之一。
Which is best based on your experience?
根据您的经验,哪个最好?
回答by Jared Farrish
I have used jQuery extensively and love it. I have reviewed ExtJS on several occasions and would love to have the chance to use this library at some point. This is my take.
我已经广泛使用 jQuery 并且喜欢它。我曾多次 ExtJS,并希望有机会在某个时候使用这个库。这是我的看法。
jQuery
jQuery
The junk drawer of javascript programming. They got everything you need in there, if you're willing to dig, use some duct tape and super glue, and in general have a group of developers able and willing to hammer code. jQuery is great!
JavaScript 编程的垃圾抽屉。他们有你需要的一切,如果你愿意挖掘,使用一些胶带和强力胶,并且通常有一群能够并且愿意敲代码的开发人员。jQuery 很棒!
It's used in way more places than you think. However, like Drupal and other community-supported frameworks/libraries, when you get free support, you get what you pay for. You can get it all done with jQuery, but sometimes you need a shovel, flashlight and perseverance.
它在比你想象的更多的地方使用。但是,与 Drupal 和其他社区支持的框架/库一样,当您获得免费支持时,您将获得所支付的费用。您可以使用 jQuery 完成这一切,但有时您需要铲子、手电筒和毅力。
Additionally, very good documentation (on par with PHP's online docs), and tons, literally tons, of example code and blog entries out there.
此外,非常好的文档(与 PHP 的在线文档相当),以及大量的示例代码和博客条目。
Will appeal to tinkerers and "advanced scripters" who are not shy to Google a phrase to find an example that can be used to scaffold a problem and speed development.
将吸引对 Google 不害羞的修补匠和“高级脚本编写者”一个短语,以找到可用于构建问题和加速开发的示例。
ExtJS
扩展JS
Professionally developed by a for-profit company, these are more akin to controls (in the context of Visual Studios) than widgets or plugins. Intentionally complete and robust, with an eye for detail and a higher-level organizational structure than I think exists in the wilds of jQuery, ExtJS is a get what you pay for: A professionally-developed and supported product that lives and dies by it's ability to return value.
由营利性公司专业开发,这些更类似于控件(在 Visual Studios 的上下文中)而不是小部件或插件。ExtJS 有意完整和健壮,着眼于细节和比我认为存在于 jQuery 中的更高级别的组织结构,ExtJS 是物有所值的:专业开发和支持的产品,其生死存亡取决于它的能力返回值。
Will appeal to professionally-trained "programmers" expecting extensive testing and a higher-order or rigorousness in the development of the controls.
将吸引受过专业培训的“程序员”,他们期望在控件的开发中进行广泛的测试和更高阶或严格的测试。
Final Recommendation
最终推荐
It really has to do with your shop and customers. If your group is more DIY and likes to glue together things and get it out the door, go with jQuery. It's robust for any situation. If you have a very ordered and professional shop, ExtJS might be a good choice, but jQuery will also be viable. I don't see the need to split your knowledgebase and use both, but really, if you do, use ExtJS for the client-facing portion and jQuery for the admin consoles. I don't see the benefit the other way around.
这确实与您的商店和客户有关。如果你的团队更喜欢 DIY 并且喜欢把东西粘在一起然后把它拿出来,那就用 jQuery。它适用于任何情况。如果你有一个非常有序和专业的商店,ExtJS 可能是一个不错的选择,但 jQuery 也将是可行的。我认为没有必要拆分您的知识库并同时使用两者,但实际上,如果您这样做了,请将 ExtJS 用于面向客户端的部分,将 jQuery 用于管理控制台。我没有看到相反的好处。
Also, for you admin consoles, look into TIBCO. Possibly overkill, but very interesting.
此外,对于您的管理控制台,请查看TIBCO。可能有点矫枉过正,但非常有趣。
回答by Ben
Jared Farrish's answer is pretty extensive already.
Jared Farrish 的回答已经非常广泛了。
I've used both on different projects.
我在不同的项目中都使用过。
ExtJS is a lot heavier in both size and what it allows you to do. It's excellent if you need a complex web application interface, it has great controls for windows, tables, etc, and it looks sleek.
ExtJS 在大小和它允许你做的事情上都要重得多。如果您需要一个复杂的 Web 应用程序界面,它非常好,它对窗口、表格等有很好的控制,而且看起来很时尚。
The ext forum community is quite helpfull through their forum.
ext 论坛社区通过他们的论坛非常有帮助。
That said it a lot more "rigid" than jQuery, and there's a significantly longer learning curve to get started, but if you are looking at complex UIs it will pay off down the track.
也就是说,它比 jQuery 更“严格”,而且入门的学习曲线要长得多,但如果您正在查看复杂的 UI,它将在轨道上得到回报。
The benefits of jQuery is therefore that it will get your project moving quicker, and it will be easier to "experiment" while implementing new features.
因此,jQuery 的好处在于它可以让您的项目更快地进行,并且在实现新功能时更容易“实验”。
They're both good for their own type of applications. I've actually used both on a project, the extensive admin (lots of windows and sections) is built in ExtJS and the front end, which needs faster turn around to tweak things but has limited ui interaction is built in jQuery.
它们都适合自己类型的应用程序。我实际上已经在一个项目中使用了这两个,广泛的管理(很多窗口和部分)是用 ExtJS 和前端构建的,它需要更快的周转来调整东西,但有限的 ui 交互是用 jQuery 构建的。
Hope this helps
希望这可以帮助
回答by Rob Boerman
I do not agree on the learning curve of jQuery being faster than ExtJS. Every component in ExtJS has a worked out example on the site and the API docs are absolutely wonderful, structured, easy to use and complete.
我不同意 jQuery 的学习曲线比 ExtJS 快。ExtJS 中的每个组件在站点上都有一个已解决的示例,API 文档绝对精彩、结构化、易于使用且完整。
What you choose depends on your interfaces. More web-2.0 like shiny interfaces might be a little easier in JQuery, the ExtJS interface is good looking but very application like. That said I think there is no comparison between the two if you are looking to create a seriously complex, data-heavy interface. ExtJS allows you to program you interface like you would your backend, completely object oriented. If you do not like some behaviour of the default components you override it. It is super easy to create reusable components yourself. In ExtJS 3 the Direct layer was introduced that takes away all the returning hassle of Ajax client-server communication and batches multiple calls together for you automatically, reducing the number of server requests you need to feed your interface. I can go on and on, but ExtJS for me is a godsend, I would not be able to create the highly complex interfaces I create in the time I am able to charge my clients.
您选择什么取决于您的接口。在 JQuery 中,更多像 web-2.0 的闪亮界面可能更容易一些,ExtJS 界面很好看,但非常像应用程序。也就是说,如果您希望创建一个非常复杂、数据量大的界面,我认为两者之间没有可比性。ExtJS 允许您像编写后端一样对界面进行编程,完全面向对象。如果您不喜欢默认组件的某些行为,您可以覆盖它。自己创建可重用的组件非常容易。在 ExtJS 3 中,引入了 Direct 层,它消除了 Ajax 客户端-服务器通信的所有返回麻烦,并自动为您批量处理多个调用,减少了您需要提供给界面的服务器请求的数量。我可以继续,但 ExtJS 对我来说是天赐之物,
Good luck with anything you choose, Rob
祝你选择任何事情好运,罗布
回答by Guillermo Dewey
I just started to use the 2 of them in 2 different projects one on each. (Ext 4 and JQuery). And yes Ext seems to be more "enterprise" but docs and learning jquery has been nice and pleasant .. On the other hand ext has been very confusing considering the most docs will refer to ext 3 and I am trying to do things on ext 4.
我刚开始在 2 个不同的项目中使用其中的 2 个。(Ext 4 和 JQuery)。是的,Ext 似乎更“企业化”,但文档和学习 jquery 一直很愉快。 .
All books and tutorials on jquery allowed me to make way more than ext so far.
到目前为止,关于 jquery 的所有书籍和教程都让我比 ext 做得更多。
Its important to note that my js experience is limited.
需要注意的是,我的js经验有限。
回答by Neil JS Grump
Let's see. EXT has a steep learning curve to get it right, and it's extremely powerful. It's the only JavaScript library I've used that I would call an actual framework(similar in that sense to YUI, which I haven't used). In version 4.x Sencha has made a full-on commitment to the MVC pattern, which appeals to a lot of experienced programmers.
让我们来看看。EXT 有一个陡峭的学习曲线来使它正确,而且它非常强大。它是我使用过的唯一一个我称之为实际框架的JavaScript 库(在这个意义上类似于我没有使用过的 YUI)。在 4.x 版本中,Sencha 对 MVC 模式做出了全面的承诺,这吸引了很多有经验的程序员。
On the other hand, jQuery makes it easy to do simple things and in my experience virtually impossible to do anything complex.
另一方面,jQuery 使做简单的事情变得容易,而根据我的经验,几乎不可能做任何复杂的事情。
Why are you limiting yourself to just those two? Take a look at MooTools, for example. It's a powerful, flexible, and extensible library, and you don't have to guess about how it's doing things, like with jQuery, or resort to raw JS to do anything other than simple DOM manipulation or JSON loads (like with jQuery!).
为什么你只限于这两个?例如,看看 MooTools。它是一个功能强大、灵活且可扩展的库,您无需猜测它是如何工作的,例如使用 jQuery,或者使用原始 JS 来执行除简单的 DOM 操作或 JSON 加载之外的任何操作(例如使用 jQuery!) .
I note that nobody has mentioned Dojo, which is also quite powerful, very complex, and from what I've seen from shoulder-surfing other teams at my office very heavy in the browser.
我注意到没有人提到 Dojo,它也非常强大、非常复杂,而且从我在我办公室的肩上冲浪的其他团队中看到的浏览器非常繁重。
EXT uses some add-on tools like compass (running in ruby) and YUI compressor to help you output extremely efficient, stripped-down download packages once you've "finished" your site. I put finishedin quotes because I think this is a downfall for EXT. After all, sites are almost never finished, and this process is roughly analogous to compiling a Java application, in that if you change anything, you have to go through the whole output process again.
EXT 使用一些附加工具,如指南针(在 ruby 中运行)和 YUI 压缩器,以帮助您在“完成”站点后输出极其高效、精简的下载包。我把完成放在引号中,因为我认为这是 EXT 的垮台。毕竟,站点几乎永远不会完成,这个过程大致类似于编译 Java 应用程序,如果您更改任何内容,则必须再次完成整个输出过程。
You get a lot straight out of the box with EXT, but that also means there's a lot to learn and a certain amount of planning and forethought to go through to execute a responsive, good-looking project. In the old days they used to call that "discipline," but it's not much in fashion these days (for more information, see "jQuery").
使用 EXT,您可以直接获得很多东西,但这也意味着需要学习很多东西,并且要执行一定数量的计划和深谋远虑才能执行响应式、美观的项目。在过去,他们曾经称其为“纪律”,但现在并不流行(有关更多信息,请参阅“jQuery”)。
But I have no opinions!
但我没有意见!
回答by SomeGuyOnTheNet
I'll only answer this question since it shows as first result for "jquery vs extjs". Like some of the people here, I've used both professionally. I especially liked the first response. For me, if I'm going to build very small application with very small team then I'd definitely go with jQuery. However... if you're working on a large team then dividing the work of jQuery might not be trivial to implement one user story. With ExtJS, they truly embrace the OO paradigm and making it easily maintainable. Also, you can use their MVC to be used as divide the work among developers. However, it comes with steep learning curve. The people who said "Look at the sample and you're gold!" clearly doesn't understand how to write GOOD extjs code. People really need to learn ExtJS Core before tackling the ExtJS UI portion... though this is really the company's fault for not having good developer documentation... good news is that there are books like ExtJS In Action that comes to the rescue. In general, I will use ExtJS because it's much more structured then jQuery. Of course, the benefit of jQuery is the flexiblity...However, too much flexibility may kill the project... Just because you can super glue lego piece in your eyes doesn't mean you should. If you have the money, go for ExtJS.
我只会回答这个问题,因为它显示为“jquery vs extjs”的第一个结果。像这里的一些人一样,我专业地使用了两者。我特别喜欢第一反应。对我来说,如果我打算用非常小的团队构建非常小的应用程序,那么我肯定会使用 jQuery。但是……如果您在一个大型团队中工作,那么将 jQuery 的工作分开来实现一个用户故事可能并非易事。使用 ExtJS,他们真正拥抱 OO 范式并使其易于维护。此外,您可以使用他们的 MVC 来划分开发人员的工作。但是,它具有陡峭的学习曲线。那些说“看看样品,你就是金子”的人!显然不明白如何编写好的 extjs 代码。人们在处理 ExtJS UI 部分之前确实需要学习 ExtJS Core……虽然这确实是公司没有好的开发人员文档的错……好消息是有像 ExtJS In Action 这样的书籍来拯救。一般来说,我会使用 ExtJS,因为它比 jQuery 结构化得多。当然,jQuery 的好处是灵活性……但是,太多的灵活性可能会扼杀项目……仅仅因为您可以将乐高积木粘在眼睛上并不意味着您应该这样做。如果你有钱,就去 ExtJS。jQuery 的好处是灵活性……然而,太多的灵活性可能会扼杀项目……仅仅因为你可以在你的眼睛里超级粘乐高积木并不意味着你应该这样做。如果你有钱,就去 ExtJS。jQuery 的好处是灵活性……然而,太多的灵活性可能会扼杀项目……仅仅因为你可以在你的眼睛里超级粘乐高积木并不意味着你应该这样做。如果你有钱,就去 ExtJS。